From 24d2353e7a216cac7d305a04f6060167d049e41b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1nos=20Benjamin=20Antal?= <benjamin.antal@memgraph.io> Date: Fri, 24 Feb 2023 08:56:13 +0100 Subject: [PATCH] Move primary keys --- src/storage/v3/request_helper.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/storage/v3/request_helper.cpp b/src/storage/v3/request_helper.cpp index f13c5a82e..f5d72ed15 100644 --- a/src/storage/v3/request_helper.cpp +++ b/src/storage/v3/request_helper.cpp @@ -46,7 +46,6 @@ struct VertexIdCmpr { std::optional<std::map<PropertyId, Value>> PrimaryKeysFromAccessor(const VertexAccessor &acc, View view, const Schemas::Schema &schema) { std::map<PropertyId, Value> ret; - auto props = acc.Properties(view); auto maybe_pk = acc.PrimaryKey(view); if (maybe_pk.HasError()) { spdlog::debug("Encountered an error while trying to get vertex primary key."); @@ -58,7 +57,7 @@ std::optional<std::map<PropertyId, Value>> PrimaryKeysFromAccessor(const VertexA ret.emplace(schema.second[i].property_id, FromPropertyValueToValue(std::move(pk[i]))); } - return ret; + return {std::move(ret)}; } ShardResult<std::vector<msgs::Label>> FillUpSourceVertexSecondaryLabels(const std::optional<VertexAccessor> &v_acc, @@ -99,7 +98,7 @@ ShardResult<std::map<PropertyId, Value>> FillUpSourceVertexProperties(const std: } auto pks = PrimaryKeysFromAccessor(*v_acc, view, schema); if (pks) { - src_vertex_properties.merge(*pks); + src_vertex_properties.merge(std::move(*pks)); } } else if (req.src_vertex_properties.value().empty()) {