From 4a5101fb00f1c54966b79d471091a0b348dca5b8 Mon Sep 17 00:00:00 2001 From: CEL Dev Team Date: Wed, 4 Sep 2024 14:07:26 -0700 Subject: [PATCH] Remove unnecessary call to reset. `EvaluateWithCallback` is only called in two places: 1. `CelExpressionFlatImpl::Trace` which already calls Reset() 1. `ProgramImpl::Trace` which calls with a newly created state PiperOrigin-RevId: 671093720 --- eval/eval/evaluator_core.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/eval/eval/evaluator_core.cc b/eval/eval/evaluator_core.cc index 253edbc71..b3e1b1ca0 100644 --- a/eval/eval/evaluator_core.cc +++ b/eval/eval/evaluator_core.cc @@ -187,7 +187,6 @@ FlatExpressionEvaluatorState FlatExpression::MakeEvaluatorState( absl::StatusOr FlatExpression::EvaluateWithCallback( const cel::ActivationInterface& activation, EvaluationListener listener, FlatExpressionEvaluatorState& state) const { - state.Reset(); ExecutionFrame frame(subexpressions_, activation, options_, state, std::move(listener));