mirror of
https://github.com/zeek/zeek.git
synced 2025-10-10 02:28:21 +00:00
Fix a swath of AUTO_CAUSES_COPY issues reported by Coverity
This commit is contained in:
parent
f631551ffb
commit
2abc82722f
7 changed files with 9 additions and 9 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue