@@ -1019,8 +1019,8 @@ bool goto_symext::constant_propagate_replace(
10191019 auto &new_data = f_l1.arguments ().at (4 );
10201020 auto &old_data = f_l1.arguments ().at (3 );
10211021
1022- array_exprt characters_to_find (s_data_opt-> get (). type ()) ;
1023- array_exprt characters_to_replace (s_data_opt-> get (). type ()) ;
1022+ array_exprt::operandst characters_to_find;
1023+ array_exprt::operandst characters_to_replace;
10241024
10251025 // Two main ways to perform a replace: characters or strings.
10261026 bool is_single_character = new_data.type ().id () == ID_unsignedbv &&
@@ -1035,8 +1035,8 @@ bool goto_symext::constant_propagate_replace(
10351035 return {};
10361036 }
10371037
1038- characters_to_find.operands (). emplace_back (old_char_pointer->get ());
1039- characters_to_replace.operands (). emplace_back (new_char_pointer->get ());
1038+ characters_to_find.emplace_back (old_char_pointer->get ());
1039+ characters_to_replace.emplace_back (new_char_pointer->get ());
10401040 }
10411041 else
10421042 {
@@ -1054,23 +1054,23 @@ bool goto_symext::constant_propagate_replace(
10541054 return {};
10551055 }
10561056
1057- characters_to_find = old_char_array_opt->get ();
1058- characters_to_replace = new_char_array_opt->get ();
1057+ characters_to_find = old_char_array_opt->get (). operands () ;
1058+ characters_to_replace = new_char_array_opt->get (). operands () ;
10591059 }
10601060
10611061 // Copy data, then do initial search for a replace sequence.
10621062 array_exprt existing_data = s_data_opt->get ();
10631063 auto found_pattern = std::search (
10641064 existing_data.operands ().begin (),
10651065 existing_data.operands ().end (),
1066- characters_to_find.operands (). begin (),
1067- characters_to_find.operands (). end ());
1066+ characters_to_find.begin (),
1067+ characters_to_find.end ());
10681068
10691069 // If we've found a match, proceed to perform a replace on all instances.
10701070 while (found_pattern != existing_data.operands ().end ())
10711071 {
10721072 // Find the difference between our first/last match iterator.
1073- auto match_end = found_pattern + characters_to_find.operands (). size ();
1073+ auto match_end = found_pattern + characters_to_find.size ();
10741074
10751075 // Erase them.
10761076 found_pattern = existing_data.operands ().erase (found_pattern, match_end);
@@ -1079,16 +1079,16 @@ bool goto_symext::constant_propagate_replace(
10791079 // our new sequence.
10801080 found_pattern = existing_data.operands ().insert (
10811081 found_pattern,
1082- characters_to_replace.operands (). begin (),
1083- characters_to_replace.operands (). end ()) +
1084- characters_to_replace.operands (). size ();
1082+ characters_to_replace.begin (),
1083+ characters_to_replace.end ()) +
1084+ characters_to_replace.size ();
10851085
10861086 // Then search from there for any additional matches.
10871087 found_pattern = std::search (
10881088 found_pattern,
10891089 existing_data.operands ().end (),
1090- characters_to_find.operands (). begin (),
1091- characters_to_find.operands (). end ());
1090+ characters_to_find.begin (),
1091+ characters_to_find.end ());
10921092 }
10931093
10941094 const constant_exprt new_char_array_length =
0 commit comments