Fix recent Coverity findings

1491334: AUTO_CAUSES_COPY due to a for loop using auto& instead of const auto&
1498652: AUTO_CAUSES_COPY due to a for loop using auto& instead of const auto&
1498745: AUTO_CAUSES_COPY due to a for loop using auto& instead of const auto&
This commit is contained in:
Tim Wojtulewicz 2022-10-05 09:49:50 -07:00
parent f35e337746
commit 31a6ef266a
3 changed files with 3 additions and 3 deletions

View file

@ -196,7 +196,7 @@ void CPPCompile::InitializeGlobals()
Emit("Frame* f__CPP = nullptr;");
NL();
for ( auto ginit : IDOptInfo::GetGlobalInitExprs() )
for ( const auto& ginit : IDOptInfo::GetGlobalInitExprs() )
{
auto g = ginit.Id();
if ( pfs.Globals().count(g) == 0 )