Skip to content

Commit

Permalink
fixed #225
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann committed Mar 30, 2016
1 parent 0951a1f commit 1baa5a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/json.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/json.hpp.re2c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

Expand Down

0 comments on commit 1baa5a7

Please sign in to comment.