@@ -994,10 +994,7 @@ codet java_bytecode_convert_methodt::convert_instructions(
994
994
std::vector<unsigned > jsr_ret_targets;
995
995
std::vector<instructionst::const_iterator> ret_instructions;
996
996
997
- for (instructionst::const_iterator
998
- i_it=instructions.begin ();
999
- i_it!=instructions.end ();
1000
- i_it++)
997
+ for (auto i_it = instructions.begin (); i_it != instructions.end (); i_it++)
1001
998
{
1002
999
converted_instructiont ins=converted_instructiont (i_it, code_skipt ());
1003
1000
std::pair<address_mapt::iterator, bool > a_entry=
@@ -1071,10 +1068,10 @@ codet java_bytecode_convert_methodt::convert_instructions(
1071
1068
if (i_it->statement ==" jsr" ||
1072
1069
i_it->statement ==" jsr_w" )
1073
1070
{
1074
- instructionst::const_iterator next=i_it+1 ;
1075
1071
assert (
1076
1072
next!=instructions.end () &&
1077
1073
" jsr without valid return address?" );
1074
+ auto next = std::next (i_it);
1078
1075
targets.insert (next->address );
1079
1076
jsr_ret_targets.push_back (next->address );
1080
1077
}
@@ -1142,9 +1139,9 @@ codet java_bytecode_convert_methodt::convert_instructions(
1142
1139
1143
1140
while (!working_set.empty ())
1144
1141
{
1145
- std::set<unsigned >::iterator cur=working_set.begin ();
1146
1142
address_mapt::iterator a_it=address_map.find (*cur);
1147
1143
CHECK_RETURN (a_it != address_map.end ());
1144
+ auto cur = working_set.begin ();
1148
1145
unsigned cur_pc=*cur;
1149
1146
working_set.erase (cur);
1150
1147
0 commit comments