File tree 4 files changed +8
-11
lines changed 4 files changed +8
-11
lines changed Original file line number Diff line number Diff line change @@ -282,8 +282,8 @@ void goto_symext::symex_function_call_code(
282
282
283
283
// read the arguments -- before the locality renaming
284
284
exprt::operandst arguments=call.arguments ();
285
- for (unsigned i= 0 ; i<arguments. size (); i++ )
286
- state.rename (arguments[i] , ns);
285
+ for (auto &a : arguments )
286
+ state.rename (a , ns);
287
287
288
288
// produce a new frame
289
289
assert (!state.call_stack ().empty ());
Original file line number Diff line number Diff line change @@ -241,9 +241,9 @@ typet java_type_from_string(const std::string &src)
241
241
return nil_typet ();
242
242
std::string class_name=src.substr (1 , src.size ()-2 );
243
243
244
- for (unsigned i= 0 ; i<class_name. size (); i++ )
245
- if (class_name[i] ==' /' )
246
- class_name[i] =' .' ;
244
+ for (auto &letter : class_name )
245
+ if (letter ==' /' )
246
+ letter =' .' ;
247
247
248
248
std::string identifier=" java::" +class_name;
249
249
symbol_typet symbol_type (identifier);
Original file line number Diff line number Diff line change @@ -37,11 +37,9 @@ language_uit::~language_uit()
37
37
38
38
bool language_uit::parse ()
39
39
{
40
- for (unsigned i=0 ; i<_cmdline.args .size (); i++)
41
- {
42
- if (parse (_cmdline.args [i]))
40
+ for (const auto &filename : _cmdline.args )
41
+ if (parse (filename))
43
42
return true ;
44
- }
45
43
46
44
return false ;
47
45
}
Original file line number Diff line number Diff line change @@ -37,9 +37,8 @@ std::string mm2cppt::text2c(const irep_idt &src)
37
37
std::string result;
38
38
result.reserve (src.size ());
39
39
40
- for (unsigned i= 0 ; i<src. size (); i++ )
40
+ for (const auto ch : id2string (src) )
41
41
{
42
- char ch=src[i];
43
42
if (isalnum (ch))
44
43
result+=ch;
45
44
else
You can’t perform that action at this time.
0 commit comments