diff --git a/src/Func.cc b/src/Func.cc index 4d80da86fe..3174c76ca8 100644 --- a/src/Func.cc +++ b/src/Func.cc @@ -332,7 +332,7 @@ ScriptFunc::ScriptFunc(std::string _name, FuncTypePtr ft, sort(bodies.begin(), bodies.end()); - if ( bodies.size() > 0 ) + if ( ! bodies.empty() ) { current_body = bodies[0].stmts; current_priority = bodies[0].priority; @@ -597,7 +597,6 @@ void ScriptFunc::ReplaceBody(const StmtPtr& old_body, StmtPtr new_body) break; } - // ASSERT(found_it); current_body = new_body; } diff --git a/src/script_opt/CPP/Inits.cc b/src/script_opt/CPP/Inits.cc index 1f055d82f8..3e3e9de63c 100644 --- a/src/script_opt/CPP/Inits.cc +++ b/src/script_opt/CPP/Inits.cc @@ -566,7 +566,7 @@ void CPPCompile::GenLoad() // Spit out the placeholder script, and any associated module // definitions. - for ( auto& m : module_names ) + for ( const auto& m : module_names ) if ( m != "GLOBAL" ) printf("module %s;\n", m.c_str());