mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Fix clang-tidy performance-for-range-copy warnings
This commit is contained in:
parent
178d7f4cd0
commit
b8e28abb97
3 changed files with 3 additions and 2 deletions
|
@ -3,6 +3,7 @@ Checks: [-*,
|
|||
performance-avoid-endl,
|
||||
performance-enum-size,
|
||||
performance-faster-string-find,
|
||||
performance-for-range-copy,
|
||||
|
||||
# Skipping these temporarily because they are very noisy
|
||||
-bugprone-narrowing-conversions,
|
||||
|
|
|
@ -651,7 +651,7 @@ bool ProfileFuncs::HasSideEffects(SideEffectsOp::AccessType access, const TypePt
|
|||
|
||||
bool ProfileFuncs::GetSideEffects(SideEffectsOp::AccessType access, const Type* t, IDSet& non_local_ids,
|
||||
TypeSet& aggrs) const {
|
||||
for ( auto se : side_effects_ops )
|
||||
for ( const auto& se : side_effects_ops )
|
||||
if ( AssessSideEffects(se.get(), access, t, non_local_ids, aggrs) )
|
||||
return true;
|
||||
|
||||
|
|
|
@ -926,7 +926,7 @@ static bool simplify_chain(const std::vector<StmtPtr>& stmts, unsigned int start
|
|||
// At this point, chain_stmts has only the remainders that weren't removed.
|
||||
for ( auto s : stmts )
|
||||
if ( chain_stmts.count(s.get()) > 0 )
|
||||
f_stmts.push_back(s);
|
||||
f_stmts.push_back(std::move(s));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue