Skip to content

Commit

Permalink
fix unnecessary copy
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzziqersoftware committed Dec 29, 2023
1 parent ac43272 commit e0ed30c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/JSON.hh
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ public:
for (const auto& item : x) {
v.emplace_back(new JSON(item));
}
this->value = v;
this->value = std::move(v);
}

// Dict constructors
Expand All @@ -121,7 +121,7 @@ public:
for (const auto& item : x) {
v.emplace(item.first, new JSON(item.second));
}
this->value = v;
this->value = std::move(v);
}

// Copy/move constructors
Expand Down

0 comments on commit e0ed30c

Please sign in to comment.