Fix clang-tidy performance-inefficient-string-concatenation warnings

This commit is contained in:
Tim Wojtulewicz 2025-04-25 16:57:22 -07:00
parent cb8c35748a
commit c609d5c90a
7 changed files with 15 additions and 9 deletions

View file

@ -341,9 +341,12 @@ void CPPCompile::RegisterCompiledBody(const string& f) {
auto be = body_events.find(f);
if ( be != body_events.end() )
for ( const auto& e : be->second ) {
if ( events.size() > 0 )
if ( ! events.empty() )
events += ", ";
events = events + "\"" + e + "\"";
events += "\"";
events += e;
events += "\"";
}
events = string("{") + events + "}";