From 37b3535543b81c3d75c8f62b83d422f0d2fbced0 Mon Sep 17 00:00:00 2001 From: Adam Date: Mon, 27 May 2013 19:36:37 -0400 Subject: Initially attach all modules to all events, and detach them as the events are run if they are not implemented per module --- src/serialize.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/serialize.cpp') diff --git a/src/serialize.cpp b/src/serialize.cpp index bb95cdc41..ef79bc396 100644 --- a/src/serialize.cpp +++ b/src/serialize.cpp @@ -55,7 +55,7 @@ Serializable::Serializable(const Anope::string &serialize_type) : last_commit(0) this->s_iter = SerializableItems->end(); --this->s_iter; - FOREACH_MOD(I_OnSerializableConstruct, OnSerializableConstruct(this)); + FOREACH_MOD(OnSerializableConstruct, (this)); } Serializable::Serializable(const Serializable &other) : last_commit(0), last_commit_time(0), id(0), redis_ignore(0) @@ -66,12 +66,12 @@ Serializable::Serializable(const Serializable &other) : last_commit(0), last_com this->s_type = other.s_type; - FOREACH_MOD(I_OnSerializableConstruct, OnSerializableConstruct(this)); + FOREACH_MOD(OnSerializableConstruct, (this)); } Serializable::~Serializable() { - FOREACH_MOD(I_OnSerializableDestruct, OnSerializableDestruct(this)); + FOREACH_MOD(OnSerializableDestruct, (this)); SerializableItems->erase(this->s_iter); } @@ -84,10 +84,10 @@ Serializable &Serializable::operator=(const Serializable &) void Serializable::QueueUpdate() { /* Schedule updater */ - FOREACH_MOD(I_OnSerializableUpdate, OnSerializableUpdate(this)); + FOREACH_MOD(OnSerializableUpdate, (this)); /* Check for modifications now - this can delete this object! */ - FOREACH_MOD(I_OnSerializeCheck, OnSerializeCheck(this->GetSerializableType())); + FOREACH_MOD(OnSerializeCheck, (this->GetSerializableType())); } bool Serializable::IsCached(Serialize::Data &data) @@ -120,7 +120,7 @@ Type::Type(const Anope::string &n, unserialize_func f, Module *o) : name(n), un TypeOrder.push_back(this->name); Types[this->name] = this; - FOREACH_MOD(I_OnSerializeTypeCreate, OnSerializeTypeCreate(this)); + FOREACH_MOD(OnSerializeTypeCreate, (this)); } Type::~Type() @@ -138,7 +138,7 @@ Serializable *Type::Unserialize(Serializable *obj, Serialize::Data &data) void Type::Check() { - FOREACH_MOD(I_OnSerializeCheck, OnSerializeCheck(this)); + FOREACH_MOD(OnSerializeCheck, (this)); } time_t Type::GetTimestamp() const -- cgit