diff options
author | Eric Fry | 2018-06-28 22:20:36 +1000 |
---|---|---|
committer | Eugene Sandulenko | 2018-07-20 06:43:33 +0000 |
commit | fee1f3d8cb065182322bc80aba39a66a1b4b0cfb (patch) | |
tree | f152dd04ca1313d799d6edcc1d20ba5f789b52e0 /engines/illusions/updatefunctions.cpp | |
parent | 608f2f1f1ae524fd6ffc656dfcef3985988adaa9 (diff) | |
download | scummvm-rg350-fee1f3d8cb065182322bc80aba39a66a1b4b0cfb.tar.gz scummvm-rg350-fee1f3d8cb065182322bc80aba39a66a1b4b0cfb.tar.bz2 scummvm-rg350-fee1f3d8cb065182322bc80aba39a66a1b4b0cfb.zip |
ILLUSIONS: always use braces for loops
Diffstat (limited to 'engines/illusions/updatefunctions.cpp')
-rw-r--r-- | engines/illusions/updatefunctions.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/engines/illusions/updatefunctions.cpp b/engines/illusions/updatefunctions.cpp index 7317508249..ae14a0ccab 100644 --- a/engines/illusions/updatefunctions.cpp +++ b/engines/illusions/updatefunctions.cpp @@ -35,8 +35,9 @@ UpdateFunctions::UpdateFunctions() { UpdateFunctions::~UpdateFunctions() { // Free update functions - for (UpdateFunctionListIterator it = _updateFunctions.begin(); it != _updateFunctions.end(); ++it) + for (UpdateFunctionListIterator it = _updateFunctions.begin(); it != _updateFunctions.end(); ++it) { delete *it; + } } void UpdateFunctions::add(int priority, uint32 sceneId, UpdateFunctionCallback *callback) { @@ -51,8 +52,9 @@ void UpdateFunctions::add(int priority, uint32 sceneId, UpdateFunctionCallback * void UpdateFunctions::update() { // Avoid running updates multiple times in the current time slice - while (_lastTimerUpdateTime == getCurrentTime()) + while (_lastTimerUpdateTime == getCurrentTime()) { g_system->delayMillis(10); // CHECKME Timer resolution + } _lastTimerUpdateTime = getCurrentTime(); UpdateFunctionListIterator it = _updateFunctions.begin(); while (it != _updateFunctions.end()) { @@ -72,9 +74,10 @@ void UpdateFunctions::update() { } void UpdateFunctions::terminateByScene(uint32 sceneId) { - for (UpdateFunctionListIterator it = _updateFunctions.begin(); it != _updateFunctions.end(); ++it) + for (UpdateFunctionListIterator it = _updateFunctions.begin(); it != _updateFunctions.end(); ++it) { if ((*it)->_sceneId == sceneId) (*it)->terminate(); + } } } // End of namespace Illusions |