diff --git a/automl_zero/algorithm_test_util.cc b/automl_zero/algorithm_test_util.cc index a2e389807a1..4447abc629f 100644 --- a/automl_zero/algorithm_test_util.cc +++ b/automl_zero/algorithm_test_util.cc @@ -163,11 +163,11 @@ IntegerT MissingDataInComponentFunction( const vector>& component_function1, const vector>& component_function2) { std::unordered_set data2; - for (shared_ptr instruction : component_function2) { + for (const shared_ptr& instruction : component_function2) { data2.insert(instruction->GetIntegerData()); } vector missing; - for (shared_ptr instruction : component_function1) { + for (const shared_ptr& instruction : component_function1) { const IntegerT data1_value = instruction->GetIntegerData(); if (data2.find(data1_value) == data2.end()) { missing.insert(missing.end(), data1_value);