@@ -273,10 +273,10 @@ bool ProgramMemory::getContainerEmptyValue(nonneg int exprid, MathLib::bigint& r
273273 const Values* values = getValues (exprid);
274274 if (!values)
275275 return false ;
276- const ValueFlow::Value empty = containerEmptyValue (*values);
277- if (empty .isUninitValue ())
276+ const ValueFlow::Value isEmpty = containerEmptyValue (*values);
277+ if (isEmpty .isUninitValue ())
278278 return false ;
279- result = empty .intvalue ;
279+ result = isEmpty .intvalue ;
280280 return true ;
281281}
282282
@@ -2058,8 +2058,9 @@ namespace {
20582058 const std::vector<const Token*> tokArgs = getArguments (expr);
20592059 std::vector<Values> args;
20602060 args.reserve (tokArgs.size ());
2061- for (const Token* tok : tokArgs)
2062- args.push_back (execute (tok));
2061+ std::transform (tokArgs.cbegin (), tokArgs.cend (), std::back_inserter (args), [&](const Token* tok) {
2062+ return execute (tok);
2063+ });
20632064 if (f) {
20642065 if (fdepth >= 0 && !f->isImplicitlyVirtual ()) {
20652066 ProgramMemory functionState;
@@ -2072,10 +2073,10 @@ namespace {
20722073 Executor ex = *this ;
20732074 ex.pm = &functionState;
20742075 ex.fdepth --;
2075- for ( const ValueFlow::Value& v : ex.execute (f->functionScope )) {
2076- if (!v. isUninitValue ())
2077- result. push_back (v );
2078- }
2076+ const std::vector< ValueFlow::Value> returned = ex.execute (f->functionScope );
2077+ std::copy_if (returned. cbegin (), returned. cend (), std::back_inserter (result), []( const ValueFlow::Value& v) {
2078+ return !v. isUninitValue ( );
2079+ });
20792080 // TODO: Track values changed by reference
20802081 }
20812082 } else {
0 commit comments