From 31ffa223876130532351a4394e32b2f311b38104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torbj=C3=B6rn=20Andersson?= Date: Sat, 24 Sep 2016 09:34:28 +0200 Subject: [PATCH] MACVENTURE: Silence Cppcheck warning I think it was harmless, but don't use 'it' after erasing it. --- engines/macventure/gui.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/engines/macventure/gui.cpp b/engines/macventure/gui.cpp index 14c99f6cd743..9e0a6e9f0012 100644 --- a/engines/macventure/gui.cpp +++ b/engines/macventure/gui.cpp @@ -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::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; } } }