File tree Expand file tree Collapse file tree 4 files changed +8
-11
lines changed Expand file tree Collapse file tree 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(
282282
283283 // read the arguments -- before the locality renaming
284284 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);
287287
288288 // produce a new frame
289289 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)
241241 return nil_typet ();
242242 std::string class_name=src.substr (1 , src.size ()-2 );
243243
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 =' .' ;
247247
248248 std::string identifier=" java::" +class_name;
249249 symbol_typet symbol_type (identifier);
Original file line number Diff line number Diff line change @@ -37,11 +37,9 @@ language_uit::~language_uit()
3737
3838bool language_uit::parse ()
3939{
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))
4342 return true ;
44- }
4543
4644 return false ;
4745}
Original file line number Diff line number Diff line change @@ -37,9 +37,8 @@ std::string mm2cppt::text2c(const irep_idt &src)
3737 std::string result;
3838 result.reserve (src.size ());
3939
40- for (unsigned i= 0 ; i<src. size (); i++ )
40+ for (const auto ch : id2string (src) )
4141 {
42- char ch=src[i];
4342 if (isalnum (ch))
4443 result+=ch;
4544 else
You can’t perform that action at this time.
0 commit comments