Skip to content

Commit 8106574

Browse files
authored
Merge pull request #566 from open-source-parsers/update
std::min<unsigned>, for VS2015 fixes #565
2 parents e25fb53 + 11836ae commit 8106574

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: src/lib_json/json_value.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ bool Value::CZString::operator<(const CZString& other) const {
303303
// Assume both are strings.
304304
unsigned this_len = this->storage_.length_;
305305
unsigned other_len = other.storage_.length_;
306-
unsigned min_len = std::min(this_len, other_len);
306+
unsigned min_len = std::min<unsigned>(this_len, other_len);
307307
JSON_ASSERT(this->cstr_ && other.cstr_);
308308
int comp = memcmp(this->cstr_, other.cstr_, min_len);
309309
if (comp < 0) return true;
@@ -566,7 +566,7 @@ bool Value::operator<(const Value& other) const {
566566
char const* other_str;
567567
decodePrefixedString(this->allocated_, this->value_.string_, &this_len, &this_str);
568568
decodePrefixedString(other.allocated_, other.value_.string_, &other_len, &other_str);
569-
unsigned min_len = std::min(this_len, other_len);
569+
unsigned min_len = std::min<unsigned>(this_len, other_len);
570570
JSON_ASSERT(this_str && other_str);
571571
int comp = memcmp(this_str, other_str, min_len);
572572
if (comp < 0) return true;

0 commit comments

Comments
 (0)