desktop: avoid dangling reference
Let the compiler figure out the correct type... Suggested-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
bded5f3e5f
commit
fdffb870e5
@ -280,7 +280,7 @@ void TemplateLayout::parser_for(QList<token> tokenList, int from, int to, QTextS
|
||||
const T *old = act;
|
||||
int i = 1; // Loop iterators start at one
|
||||
int olditerator = state.forloopiterator;
|
||||
for (const T &item: data) {
|
||||
for (auto &item: data) {
|
||||
act = &item;
|
||||
state.forloopiterator = i++;
|
||||
parser(tokenList, from, to, out, state);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user