mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Use properly-sized loop variables or convert to ranged-for (bugprone-too-small-loop-variable)
This commit is contained in:
parent
94c4c85e82
commit
1248411a2f
22 changed files with 89 additions and 95 deletions
10
src/Func.cc
10
src/Func.cc
|
@ -208,9 +208,9 @@ TraversalCode Func::Traverse(TraversalCallback* cb) const
|
|||
tc = scope->Traverse(cb);
|
||||
HANDLE_TC_STMT_PRE(tc);
|
||||
|
||||
for ( unsigned int i = 0; i < bodies.size(); ++i )
|
||||
for ( const auto& body : bodies )
|
||||
{
|
||||
tc = bodies[i].stmts->Traverse(cb);
|
||||
tc = body.stmts->Traverse(cb);
|
||||
HANDLE_TC_STMT_PRE(tc);
|
||||
}
|
||||
}
|
||||
|
@ -587,10 +587,10 @@ void ScriptFunc::Describe(ODesc* d) const
|
|||
|
||||
d->NL();
|
||||
d->AddCount(frame_size);
|
||||
for ( unsigned int i = 0; i < bodies.size(); ++i )
|
||||
for ( const auto& body : bodies )
|
||||
{
|
||||
bodies[i].stmts->AccessStats(d);
|
||||
bodies[i].stmts->Describe(d);
|
||||
body.stmts->AccessStats(d);
|
||||
body.stmts->Describe(d);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue