From 657279949aece28624900b012365adca8fa9d9a2 Mon Sep 17 00:00:00 2001 From: gvolfing Date: Wed, 8 Feb 2023 12:13:46 +0100 Subject: [PATCH] Fix compile error --- src/query/v2/plan/operator.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/query/v2/plan/operator.cpp b/src/query/v2/plan/operator.cpp index 6fa9c4db9..4337add0d 100644 --- a/src/query/v2/plan/operator.cpp +++ b/src/query/v2/plan/operator.cpp @@ -1335,12 +1335,14 @@ bool ContainsSameEdge(const TypedValue &a, const TypedValue &b) { } bool IsExpansionOk(Frame &frame, const Symbol &expand_symbol, const std::vector &previous_symbols) { - // This shouldn't raise a TypedValueException, because the planner - // makes sure these are all of the expected type. In case they are not - // an error should be raised long before this code is executed. - return std::ranges::all_of(previous_symbols, [&expand_value = frame[expand_symbol]](const auto& previous_symbol) { - return ContainsSameEdge(previous_value, expand_value); - }); + // This shouldn't raise a TypedValueException, because the planner + // makes sure these are all of the expected type. In case they are not + // an error should be raised long before this code is executed. + return std::ranges::all_of(previous_symbols, + [&frame, &expand_value = frame[expand_symbol]](const auto &previous_symbol) { + const auto &previous_value = frame[previous_symbol]; + return ContainsSameEdge(previous_value, expand_value); + }); } } // namespace