diff --git a/src/Context.cpp b/src/Context.cpp index 988bc74e5..5a650cd8f 100644 --- a/src/Context.cpp +++ b/src/Context.cpp @@ -534,8 +534,8 @@ int Context::initialize (int argc, const char** argv) // //////////////////////////////////////////////////////////////////////////// - for (auto & modifierName : modifierNames) - cli2.entity ("modifier", modifierName); + for (unsigned int i = 0; i < NUM_MODIFIER_NAMES; ++i) + cli2.entity ("modifier", modifierNames[i]); for (auto& op : Eval::getOperators ()) cli2.entity ("operator", op); diff --git a/src/Eval.cpp b/src/Eval.cpp index 445a90e2c..de278aecb 100644 --- a/src/Eval.cpp +++ b/src/Eval.cpp @@ -195,8 +195,8 @@ void Eval::debug (bool value) std::vector Eval::getOperators () { std::vector all; - for (auto & i : operators) - all.push_back (i.op); + for (unsigned int i = 0; i < NUM_OPERATORS; ++i) + all.push_back (operators[i].op); return all; } @@ -206,9 +206,9 @@ std::vector Eval::getOperators () std::vector Eval::getBinaryOperators () { std::vector all; - for (auto & i : operators) - if (i.type == 'b') - all.push_back (i.op); + for (unsigned int i = 0; i < NUM_OPERATORS; ++i) + if (operators[i].type == 'b') + all.push_back (operators[i].op); return all; } @@ -338,9 +338,9 @@ void Eval::evaluatePostfixStack ( case Lexer::Type::identifier: { bool found = false; - for (auto _source : _sources) + for (auto source = _sources.begin (); source != _sources.end (); ++source) { - if (_source (token.first, v)) + if ((*source) (token.first, v)) { if (_debug) Context::getContext ().debug (format ("Eval identifier source '{1}' → ↑'{2}'", token.first, (std::string) v)); @@ -669,10 +669,10 @@ bool Eval::parsePrimitive ( else { bool found = false; - for (auto _source : _sources) + for (auto source = _sources.begin (); source != _sources.end (); ++source) { Variant v; - if (_source (infix[i].first, v)) + if ((*source) (infix[i].first, v)) { found = true; break; @@ -810,13 +810,13 @@ bool Eval::identifyOperator ( unsigned int& precedence, char& associativity) const { - for (auto & i : operators) + for (unsigned int i = 0; i < NUM_OPERATORS; ++i) { - if (i.op == op) + if (operators[i].op == op) { - type = i.type; - precedence = i.precedence; - associativity = i.associativity; + type = operators[i].type; + precedence = operators[i].precedence; + associativity = operators[i].associativity; return true; } } diff --git a/src/ViewTask.cpp b/src/ViewTask.cpp index 488a467f1..b39057e1f 100644 --- a/src/ViewTask.cpp +++ b/src/ViewTask.cpp @@ -320,8 +320,8 @@ std::string ViewTask::render (std::vector & data, std::vector & seque if (obfuscate) if (_columns[c]->type () == "string") - for (auto & line : cells[c]) - line = obfuscateText (line); + for (unsigned int line = 0; line < cells[c].size (); ++line) + cells[c][line] = obfuscateText (cells[c][line]); } // Listing breaks are simply blank lines inserted when a column value diff --git a/src/dependency.cpp b/src/dependency.cpp index 03af7e596..26fdf013a 100644 --- a/src/dependency.cpp +++ b/src/dependency.cpp @@ -91,9 +91,9 @@ bool dependencyIsCircular (const Task& task) // This is a basic depth first search that always terminates given the // fact that we do not visit any task twice - for (const auto & i : deps_current) + for (unsigned int i = 0; i < deps_current.size (); i++) { - if (Context::getContext ().tdb2.get (i, current)) + if (Context::getContext ().tdb2.get (deps_current[i], current)) { auto current_uuid = current.get ("uuid");