Skip to content

Commit

Permalink
Always create a new kv pair to avoid using shared strings
Browse files Browse the repository at this point in the history
  • Loading branch information
oxidase authored and Patrick Niklaus committed Apr 4, 2018
1 parent 9889a45 commit 14d2199
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/storage/serialization.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,10 +245,10 @@ write<bool>(tar::FileWriter &writer, const std::string &name, const std::vector<
template <typename K, typename V> void read(io::BufferReader &reader, std::map<K, V> &data)
{
const auto count = reader.ReadElementCount64();
std::pair<K, V> pair;
for (auto index : util::irange<std::size_t>(0, count))
{
(void)index;
std::pair<K, V> pair;
read(reader, pair.first);
read(reader, pair.second);
data.insert(pair);
Expand Down

0 comments on commit 14d2199

Please sign in to comment.