low-level coding style fixes

This commit is contained in:
Vern Paxson 2021-06-29 15:17:34 -07:00
parent b4f025dda9
commit 30cb91fe35
2 changed files with 2 additions and 3 deletions

View file

@ -332,7 +332,7 @@ ScriptFunc::ScriptFunc(std::string _name, FuncTypePtr ft,
sort(bodies.begin(), bodies.end()); sort(bodies.begin(), bodies.end());
if ( bodies.size() > 0 ) if ( ! bodies.empty() )
{ {
current_body = bodies[0].stmts; current_body = bodies[0].stmts;
current_priority = bodies[0].priority; current_priority = bodies[0].priority;
@ -597,7 +597,6 @@ void ScriptFunc::ReplaceBody(const StmtPtr& old_body, StmtPtr new_body)
break; break;
} }
// ASSERT(found_it);
current_body = new_body; current_body = new_body;
} }

View file

@ -566,7 +566,7 @@ void CPPCompile::GenLoad()
// Spit out the placeholder script, and any associated module // Spit out the placeholder script, and any associated module
// definitions. // definitions.
for ( auto& m : module_names ) for ( const auto& m : module_names )
if ( m != "GLOBAL" ) if ( m != "GLOBAL" )
printf("module %s;\n", m.c_str()); printf("module %s;\n", m.c_str());