Reduce number of copies in query::Parameters
Reviewers: teon.banek Reviewed By: teon.banek Subscribers: pullbot Differential Revision: https://phabricator.memgraph.io/D2564
This commit is contained in:
parent
3c615759b6
commit
42a4f310ff
@ -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<int, PropertyValue> 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;
|
||||
|
Loading…
Reference in New Issue
Block a user