mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-04-27 18:17:22 +02:00
LibSQL: Copy SQL::Value instances less frequently (which may be vectors)
This commit is contained in:
committed by
Ali Mohammad Pur
parent
5f549fe5d9
commit
c0b54f18b5
Notes:
sideshowbarker
2024-07-17 05:48:37 +09:00
Author: https://github.com/trflynn89 Commit: https://github.com/SerenityOS/serenity/commit/c0b54f18b5 Pull-request: https://github.com/SerenityOS/serenity/pull/15312 Reviewed-by: https://github.com/alimpfard
@@ -40,12 +40,13 @@ ResultOr<Value> NestedExpression::evaluate(ExecutionContext& context) const
|
||||
|
||||
ResultOr<Value> ChainedExpression::evaluate(ExecutionContext& context) const
|
||||
{
|
||||
Value ret(SQLType::Tuple);
|
||||
Vector<Value> values;
|
||||
TRY(values.try_ensure_capacity(expressions().size()));
|
||||
|
||||
for (auto& expression : expressions())
|
||||
values.append(TRY(expression.evaluate(context)));
|
||||
ret = values;
|
||||
return ret;
|
||||
values.unchecked_append(TRY(expression.evaluate(context)));
|
||||
|
||||
return Value { move(values) };
|
||||
}
|
||||
|
||||
ResultOr<Value> BinaryOperatorExpression::evaluate(ExecutionContext& context) const
|
||||
|
||||
Reference in New Issue
Block a user