mirror of
https://github.com/anope/anope.git
synced 2026-06-27 12:56:37 +02:00
Added a classbase for the major classes, makes dynamic_reference invalidation really work.
This also cleans up a bit of the code in the modestacker.
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#include "services.h"
|
||||
#include "modules.h"
|
||||
|
||||
Base::Base()
|
||||
{
|
||||
}
|
||||
|
||||
Base::~Base()
|
||||
{
|
||||
for (std::set<dynamic_reference_base *>::iterator it = this->References.begin(), it_end = this->References.end(); it != it_end; ++it)
|
||||
{
|
||||
(*it)->Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
void Base::AddReference(dynamic_reference_base *r)
|
||||
{
|
||||
this->References.insert(r);
|
||||
}
|
||||
|
||||
void Base::DelReference(dynamic_reference_base *r)
|
||||
{
|
||||
this->References.erase(r);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user