From: Gunnar Beutner Date: Fri, 27 Apr 2012 11:11:07 +0000 (+0200) Subject: Bugfix for deleting delegates. X-Git-Tag: v0.0.1~571 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5c603ee98b35efd24b2233ba8249143d186e323d;p=icinga2 Bugfix for deleting delegates. --- diff --git a/base/event.h b/base/event.h index 725b4a03f..9628142af 100644 --- a/base/event.h +++ b/base/event.h @@ -33,16 +33,15 @@ public: void operator()(const TArgs& args) { - typename vector::iterator prev, i; + typename vector::iterator i; for (i = m_Delegates.begin(); i != m_Delegates.end(); ) { - prev = i; - i++; - - int result = (*prev)(args); + int result = (*i)(args); if (result == -1) - m_Delegates.erase(prev); + i = m_Delegates.erase(i); + else + i++; } } }; diff --git a/components/demo/demo.vcxproj.filters b/components/demo/demo.vcxproj.filters new file mode 100644 index 000000000..51b6a0536 --- /dev/null +++ b/components/demo/demo.vcxproj.filters @@ -0,0 +1,10 @@ + + + + + + + + + + \ No newline at end of file diff --git a/jsonrpc/jsonrpc.vcxproj.filters b/jsonrpc/jsonrpc.vcxproj.filters new file mode 100644 index 000000000..6e33d2942 --- /dev/null +++ b/jsonrpc/jsonrpc.vcxproj.filters @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file