Skip to content

Commit

Permalink
MACVENTURE: Silence Cppcheck warning
Browse files Browse the repository at this point in the history
I think it was harmless, but don't use 'it' after erasing it.
  • Loading branch information
Torbjörn Andersson committed Sep 24, 2016
1 parent 42d8a82 commit 31ffa22
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions engines/macventure/gui.cpp
Expand Up @@ -1129,12 +1129,11 @@ Common::Point Gui::localizeTravelledDistance(Common::Point point, WindowReferenc

void Gui::removeInventoryWindow(WindowReference ref) {
_inventoryWindows.remove_at(ref - kInventoryStart);
bool found = false;
Common::List<WindowData>::iterator it;
for (it = _windowData->begin(); it != _windowData->end() && !found; it++) {
for (it = _windowData->begin(); it != _windowData->end(); it++) {
if (it->refcon == ref) {
_windowData->erase(it);
found = true;
break;
}
}
}
Expand Down

0 comments on commit 31ffa22

Please sign in to comment.