Fix clang-tidy modernize-loop-convert findings

This commit is contained in:
Tim Wojtulewicz 2025-05-13 10:06:13 -07:00
parent 49b803c0a8
commit f3588657bf
56 changed files with 452 additions and 542 deletions

View file

@ -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;
}