From f2c12887ba9fcde6c1f70ade72d231d131d172e5 Mon Sep 17 00:00:00 2001 From: Peter Kuemmel Date: Sat, 16 Jun 2012 12:51:25 +0200 Subject: [PATCH] Ninja: msvc6 for-scoping --- Source/cmcldeps.cxx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Source/cmcldeps.cxx b/Source/cmcldeps.cxx index d62bd9043..356e214ac 100644 --- a/Source/cmcldeps.cxx +++ b/Source/cmcldeps.cxx @@ -448,17 +448,17 @@ Subprocess* SubprocessSet::NextFinished() { } void SubprocessSet::Clear() { - for (std::vector::iterator i = running_.begin(); - i != running_.end(); ++i) { - if ((*i)->child_.hProcess) { + std::vector::iterator it = running_.begin(); + for (; it != running_.end(); ++it) { + if ((*it)->child_.hProcess) { if (!GenerateConsoleCtrlEvent(CTRL_BREAK_EVENT, - (*i)->child_.dwProcessId)) + (*it)->child_.dwProcessId)) Win32Fatal("GenerateConsoleCtrlEvent"); } } - for (std::vector::iterator i = running_.begin(); - i != running_.end(); ++i) - delete *i; + it = running_.begin(); + for (; it != running_.end(); ++it) + delete *it; running_.clear(); }