diff --git a/theta/include/theta_set_difference_base_impl.hpp b/theta/include/theta_set_difference_base_impl.hpp index 02317816..40f94a2f 100644 --- a/theta/include/theta_set_difference_base_impl.hpp +++ b/theta/include/theta_set_difference_base_impl.hpp @@ -69,7 +69,7 @@ CS theta_set_difference_base::compute(FwdSketch&& a, const Sketch const uint64_t hash = EK()(entry); if (hash < theta) { auto result = table.find(hash); - if (!result.second) entries.push_back(conditional_forward(entry)); + if (!result.second) entries.emplace_back(conditional_forward(entry)); } else if (a.is_ordered()) { break; // early stop } diff --git a/tuple/include/array_tuple_sketch_impl.hpp b/tuple/include/array_tuple_sketch_impl.hpp index 42b39216..ad0c999c 100644 --- a/tuple/include/array_tuple_sketch_impl.hpp +++ b/tuple/include/array_tuple_sketch_impl.hpp @@ -166,7 +166,7 @@ compact_array_tuple_sketch compact_array_tuple_sketch compact_array_tuple_sketch compact_tuple_sketch::deserialize(std::istream& for (size_t i = 0; i < num_entries; ++i) { const auto key = read(is); sd.deserialize(is, summary.get(), 1); - entries.push_back(Entry(key, std::move(*summary))); + entries.emplace_back(key, std::move(*summary)); (*summary).~S(); } } @@ -585,7 +585,7 @@ compact_tuple_sketch compact_tuple_sketch::deserialize(const void* b uint64_t key; ptr += copy_from_mem(ptr, key); ptr += sd.deserialize(ptr, base + size - ptr, summary.get(), 1); - entries.push_back(Entry(key, std::move(*summary))); + entries.emplace_back(key, std::move(*summary)); (*summary).~S(); } }