From 42a4f310ffafd4e17ec934cb47ce7a2e34875132 Mon Sep 17 00:00:00 2001 From: Matej Ferencevic Date: Sat, 23 Nov 2019 16:48:54 +0100 Subject: [PATCH] Reduce number of copies in query::Parameters Reviewers: teon.banek Reviewed By: teon.banek Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D2564 --- src/query/parameters.hpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/query/parameters.hpp b/src/query/parameters.hpp index 37a853d38..f21e26b93 100644 --- a/src/query/parameters.hpp +++ b/src/query/parameters.hpp @@ -33,10 +33,9 @@ struct Parameters { * @return Value for the given token position. */ const PropertyValue &AtTokenPosition(int position) const { - auto found = std::find_if(storage_.begin(), storage_.end(), - [&](const std::pair a) { - return a.first == position; - }); + auto found = + std::find_if(storage_.begin(), storage_.end(), + [&](const auto &a) { return a.first == position; }); CHECK(found != storage_.end()) << "Token position must be present in container"; return found->second;