diff --git a/src/plugins/projectexplorer/projectmacro.cpp b/src/plugins/projectexplorer/projectmacro.cpp index 5d2824f01db..4a6ca945c97 100644 --- a/src/plugins/projectexplorer/projectmacro.cpp +++ b/src/plugins/projectexplorer/projectmacro.cpp @@ -166,12 +166,12 @@ QList Macro::tokenizeLine(const QByteArray &line) const auto begin = normalizedLine.begin(); auto first = std::find(normalizedLine.begin(), normalizedLine.end(), ' '); - auto second = std::find(std::next(first), normalizedLine.end(), ' '); const auto end = normalizedLine.end(); QList tokens; if (first != end) { + auto second = std::find(std::next(first), normalizedLine.end(), ' '); tokens.append(QByteArray(begin, int(std::distance(begin, first)))); std::advance(first, 1);