Fix a swath of AUTO_CAUSES_COPY issues reported by Coverity

This commit is contained in:
Tim Wojtulewicz 2022-08-15 09:45:46 -07:00
parent f631551ffb
commit 2abc82722f
7 changed files with 9 additions and 9 deletions

View file

@ -883,7 +883,7 @@ bool SwitchStmt::AddCaseLabelValueMapping(const Val* v, int idx)
bool SwitchStmt::AddCaseLabelTypeMapping(ID* t, int idx)
{
for ( auto i : case_label_type_list )
for ( const auto& i : case_label_type_list )
{
if ( same_type(i.first->GetType(), t->GetType()) )
return false;
@ -918,7 +918,7 @@ std::pair<int, ID*> SwitchStmt::FindCaseLabelMatch(const Val* v) const
}
// Find matching type cases.
for ( auto i : case_label_type_list )
for ( const auto& i : case_label_type_list )
{
auto id = i.first;
const auto& type = id->GetType();