Fix #1642
While in our case, only the string case was affected, to be safe and allow the library to work with other unforeseen cases, all of the cases have been wrapped with parentheses. Thank you @DyXel and @edo9300
This commit is contained in:
parent
4fc98e0b34
commit
f4fca2d59a
2 changed files with 12 additions and 12 deletions
|
@ -5746,25 +5746,25 @@ class basic_json
|
||||||
return (*lhs.m_value.array) < (*rhs.m_value.array);
|
return (*lhs.m_value.array) < (*rhs.m_value.array);
|
||||||
|
|
||||||
case value_t::object:
|
case value_t::object:
|
||||||
return *lhs.m_value.object < *rhs.m_value.object;
|
return (*lhs.m_value.object) < (*rhs.m_value.object);
|
||||||
|
|
||||||
case value_t::null:
|
case value_t::null:
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
case value_t::string:
|
case value_t::string:
|
||||||
return *lhs.m_value.string < *rhs.m_value.string;
|
return (*lhs.m_value.string) < (*rhs.m_value.string);
|
||||||
|
|
||||||
case value_t::boolean:
|
case value_t::boolean:
|
||||||
return lhs.m_value.boolean < rhs.m_value.boolean;
|
return (lhs.m_value.boolean) < (rhs.m_value.boolean);
|
||||||
|
|
||||||
case value_t::number_integer:
|
case value_t::number_integer:
|
||||||
return lhs.m_value.number_integer < rhs.m_value.number_integer;
|
return (lhs.m_value.number_integer) < (rhs.m_value.number_integer);
|
||||||
|
|
||||||
case value_t::number_unsigned:
|
case value_t::number_unsigned:
|
||||||
return lhs.m_value.number_unsigned < rhs.m_value.number_unsigned;
|
return (lhs.m_value.number_unsigned) < (rhs.m_value.number_unsigned);
|
||||||
|
|
||||||
case value_t::number_float:
|
case value_t::number_float:
|
||||||
return lhs.m_value.number_float < rhs.m_value.number_float;
|
return (lhs.m_value.number_float) < (rhs.m_value.number_float);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -18547,25 +18547,25 @@ class basic_json
|
||||||
return (*lhs.m_value.array) < (*rhs.m_value.array);
|
return (*lhs.m_value.array) < (*rhs.m_value.array);
|
||||||
|
|
||||||
case value_t::object:
|
case value_t::object:
|
||||||
return *lhs.m_value.object < *rhs.m_value.object;
|
return (*lhs.m_value.object) < (*rhs.m_value.object);
|
||||||
|
|
||||||
case value_t::null:
|
case value_t::null:
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
case value_t::string:
|
case value_t::string:
|
||||||
return *lhs.m_value.string < *rhs.m_value.string;
|
return (*lhs.m_value.string) < (*rhs.m_value.string);
|
||||||
|
|
||||||
case value_t::boolean:
|
case value_t::boolean:
|
||||||
return lhs.m_value.boolean < rhs.m_value.boolean;
|
return (lhs.m_value.boolean) < (rhs.m_value.boolean);
|
||||||
|
|
||||||
case value_t::number_integer:
|
case value_t::number_integer:
|
||||||
return lhs.m_value.number_integer < rhs.m_value.number_integer;
|
return (lhs.m_value.number_integer) < (rhs.m_value.number_integer);
|
||||||
|
|
||||||
case value_t::number_unsigned:
|
case value_t::number_unsigned:
|
||||||
return lhs.m_value.number_unsigned < rhs.m_value.number_unsigned;
|
return (lhs.m_value.number_unsigned) < (rhs.m_value.number_unsigned);
|
||||||
|
|
||||||
case value_t::number_float:
|
case value_t::number_float:
|
||||||
return lhs.m_value.number_float < rhs.m_value.number_float;
|
return (lhs.m_value.number_float) < (rhs.m_value.number_float);
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue