mirror of
https://github.com/zeek/zeek.git
synced 2025-10-11 11:08:20 +00:00
Fix clang-tidy modernize-loop-convert findings
This commit is contained in:
parent
49b803c0a8
commit
f3588657bf
56 changed files with 452 additions and 542 deletions
|
@ -312,8 +312,7 @@ bool MultiZBI::Build(ZAMCompiler* zam, const NameExpr* n, const ExprPList& args)
|
|||
std::vector<ValPtr> consts;
|
||||
std::vector<int> v;
|
||||
|
||||
for ( auto i = 0U; i < args.size(); ++i ) {
|
||||
auto a = args[i];
|
||||
for ( const auto& a : args ) {
|
||||
if ( a->Tag() == EXPR_NAME )
|
||||
v.push_back(zam->FrameSlot(a->AsNameExpr()));
|
||||
else
|
||||
|
@ -402,9 +401,9 @@ bool MultiZBI::Build(ZAMCompiler* zam, const NameExpr* n, const ExprPList& args)
|
|||
BiFArgsType MultiZBI::ComputeArgsType(const ExprPList& args) const {
|
||||
zeek_uint_t mask = 0;
|
||||
|
||||
for ( auto i = 0U; i < args.size(); ++i ) {
|
||||
for ( const auto& a : args ) {
|
||||
mask <<= 1;
|
||||
if ( args[i]->Tag() == EXPR_CONST )
|
||||
if ( a->Tag() == EXPR_CONST )
|
||||
mask |= 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue