mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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
1 changed files with 1 additions and 1 deletions
|
@ -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…
Reference in a new issue