diff --git a/src/Notifier.cc b/src/Notifier.cc index ce3e8d68eb..63afa3ddbd 100644 --- a/src/Notifier.cc +++ b/src/Notifier.cc @@ -58,13 +58,10 @@ void Registry::Modified(Modifiable* m) { } void Registry::Terminate() { - std::set receivers; - - for ( auto& r : registrations ) - receivers.emplace(r.second); - - for ( auto& r : receivers ) - r->Terminate(); + while ( ! registrations.empty() ) { + const auto& it = registrations.begin(); + it->second->Terminate(); + } } Modifiable::~Modifiable() { diff --git a/src/Trigger.h b/src/Trigger.h index 8b2004f42b..6c4fade3be 100644 --- a/src/Trigger.h +++ b/src/Trigger.h @@ -69,7 +69,7 @@ public: ~Trigger() override; // Evaluates the condition. If true, executes the body and deletes - // the object deleted. + // the object. // // Returns the state of condition. bool Eval();