Use const reference in loop in JSON Save Game example
Fixes: QTBUG-108857 Change-Id: I503a3c9ebe145d0dae52b74435212807405f0247 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
a62f49e736
commit
3b0ef74694
@ -155,6 +155,6 @@ void Game::print(int indentation) const
|
|||||||
mPlayer.print(indentation + 1);
|
mPlayer.print(indentation + 1);
|
||||||
|
|
||||||
QTextStream(stdout) << indent << "Levels\n";
|
QTextStream(stdout) << indent << "Levels\n";
|
||||||
for (Level level : mLevels)
|
for (const Level &level : mLevels)
|
||||||
level.print(indentation + 1);
|
level.print(indentation + 1);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user