mirror of
https://github.com/nlohmann/json
synced 2024-11-26 22:00:07 +00:00
fixed #225
This commit is contained in:
parent
0951a1f94c
commit
1baa5a7350
@ -1580,14 +1580,14 @@ class basic_json
|
||||
|
||||
for (auto& element : init)
|
||||
{
|
||||
m_value.object->emplace(std::move(*(element[0].m_value.string)), std::move(element[1]));
|
||||
m_value.object->emplace(*(element[0].m_value.string), element[1]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// the initializer list describes an array -> create array
|
||||
m_type = value_t::array;
|
||||
m_value.array = create<array_t>(std::move(init));
|
||||
m_value.array = create<array_t>(init);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1580,14 +1580,14 @@ class basic_json
|
||||
|
||||
for (auto& element : init)
|
||||
{
|
||||
m_value.object->emplace(std::move(*(element[0].m_value.string)), std::move(element[1]));
|
||||
m_value.object->emplace(*(element[0].m_value.string), element[1]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// the initializer list describes an array -> create array
|
||||
m_type = value_t::array;
|
||||
m_value.array = create<array_t>(std::move(init));
|
||||
m_value.array = create<array_t>(init);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user