diff --git a/include/modules.h b/include/modules.h index aef6d7d30..14661d1c7 100644 --- a/include/modules.h +++ b/include/modules.h @@ -63,7 +63,6 @@ if (true) \ { \ static std::vector &_modules = ModuleManager::GetEventHandlers(#ename); \ - bool _shrink = false; \ for (std::vector::iterator _i = _modules.begin(); _i != _modules.end();) \ { \ try \ @@ -77,13 +76,10 @@ if (true) \ catch (const NotImplementedException &) \ { \ _i = _modules.erase(_i); \ - _shrink = true; \ continue; \ } \ ++_i; \ } \ - if (_shrink) \ - std::vector(_modules).swap(_modules); \ } \ else \ static_cast(0) @@ -101,7 +97,6 @@ if (true) \ { \ ret = EVENT_CONTINUE; \ static std::vector &_modules = ModuleManager::GetEventHandlers(#ename); \ - bool _shrink = false; \ for (std::vector::iterator _i = _modules.begin(); _i != _modules.end();) \ { \ try \ @@ -120,13 +115,10 @@ if (true) \ catch (const NotImplementedException &) \ { \ _i = _modules.erase(_i); \ - _shrink = true; \ continue; \ } \ ++_i; \ } \ - if (_shrink) \ - std::vector(_modules).swap(_modules); \ } \ else \ static_cast(0)