Skip to content

Commit eb9a789

Browse files
romainbrenguierJoel Allred
authored and
Joel Allred
committed
Correcting addition of symbol to symbol map
There was a mistake that could cause looping over symbols in the map that don't actually need to be modified and could greatly slow down the analysis. Correction after review from Peter Schrammel: Use const reference for symbols_to_update_wit_new_rhs
1 parent f4f4c44 commit eb9a789

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/solvers/refinement/string_refinement.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,8 @@ void string_refinementt::add_symbol_to_symbol_map(
187187
symbol_resolve[lhs]=new_rhs;
188188
reverse_symbol_resolve[new_rhs].push_back(lhs);
189189

190-
std::list<exprt> symbols_to_update_with_new_rhs(reverse_symbol_resolve[rhs]);
190+
const std::list<exprt> &symbols_to_update_with_new_rhs(
191+
reverse_symbol_resolve[lhs]);
191192
for(exprt item : symbols_to_update_with_new_rhs)
192193
{
193194
symbol_resolve[item]=new_rhs;

0 commit comments

Comments
 (0)