App: modernize C++: use range-based for loop

This commit is contained in:
wmayer
2023-08-14 16:37:45 +02:00
committed by wwmayer
parent 761905dbc2
commit 4991475341
22 changed files with 422 additions and 418 deletions

View File

@@ -2545,8 +2545,8 @@ Expression *FunctionExpression::simplify() const
std::vector<Expression*> a;
// Try to simplify each argument to function
for (auto it = args.begin(); it != args.end(); ++it) {
Expression * v = (*it)->simplify();
for (auto it : args) {
Expression * v = it->simplify();
if (freecad_dynamic_cast<NumberExpression>(v))
++numerics;
@@ -2557,8 +2557,8 @@ Expression *FunctionExpression::simplify() const
// All constants, then evaluation must also be constant
// Clean-up
for (auto it = args.begin(); it != args.end(); ++it)
delete *it;
for (auto it : args)
delete it;
return eval();
}