mirror of
https://github.com/nlohmann/json.git
synced 2024-12-03 05:29:01 +08: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