1
0
mirror of https://github.com/nlohmann/json.git synced 2025-07-27 00:41:05 +03:00

Merge branch 'develop' into issue550

This commit is contained in:
HenryLee
2017-06-05 20:24:08 +10:00
3 changed files with 30 additions and 7 deletions

View File

@ -6381,7 +6381,7 @@ class basic_json
{
case value_t::array:
{
return *lhs.m_value.array < *rhs.m_value.array;
return (*lhs.m_value.array) < (*rhs.m_value.array);
}
case value_t::object:
{
@ -8799,7 +8799,7 @@ class basic_json
// store number of bytes in the buffer
fill_size = static_cast<size_t>(is.gcount());
// skip byte-order mark
// skip byte order mark
if (fill_size >= 3 and buffer[0] == '\xEF' and buffer[1] == '\xBB' and buffer[2] == '\xBF')
{
buffer_pos += 3;
@ -8896,7 +8896,13 @@ class basic_json
public:
input_buffer_adapter(const char* b, size_t l)
: input_adapter(), cursor(b), limit(b + l), start(b)
{}
{
// skip byte order mark
if (l >= 3 and b[0] == '\xEF' and b[1] == '\xBB' and b[2] == '\xBF')
{
cursor += 3;
}
}
// delete because of pointer members
input_buffer_adapter(const input_buffer_adapter&) = delete;