diff options
| author | Adam <Adam@anope.org> | 2010-09-10 15:46:19 -0400 |
|---|---|---|
| committer | Adam <Adam@anope.org> | 2010-09-10 15:46:19 -0400 |
| commit | 9eb7562bee7f2a52cf91b0ab0ebc10351f2a46f2 (patch) | |
| tree | 1dcc4928486a08643af70f69f094ab44c41642e5 /include/modules.h | |
| parent | 46813ccb8c6ab572b8a9ff0a39afb1d92dc4482b (diff) | |
Fixed bug #1187 - Fixed releasing enforcer clients on TS6 IRCds
Diffstat (limited to 'include/modules.h')
| -rw-r--r-- | include/modules.h | 63 |
1 files changed, 0 insertions, 63 deletions
diff --git a/include/modules.h b/include/modules.h index 05a0bd1a8..e1675c7e6 100644 --- a/include/modules.h +++ b/include/modules.h @@ -1261,69 +1261,6 @@ class Service : public virtual Base virtual ~Service(); }; -class dynamic_reference_base : public virtual Base -{ - protected: - bool invalid; - public: - dynamic_reference_base() : invalid(false) { } - virtual ~dynamic_reference_base() { } - inline void Invalidate() { this->invalid = true; } -}; - -template<typename T> -class dynamic_reference : public dynamic_reference_base -{ - protected: - T *ref; - public: - dynamic_reference(T *obj) : ref(obj) - { - if (ref) - ref->AddReference(this); - } - - virtual ~dynamic_reference() - { - if (this->invalid) - { - this->invalid = false; - this->ref = NULL; - } - else if (ref) - ref->DelReference(this); - } - - virtual operator bool() - { - if (this->invalid) - { - this->invalid = false; - this->ref = NULL; - } - return this->ref; - } - - virtual inline void operator=(T *newref) - { - if (this->invalid) - { - this->invalid = false; - this->ref = NULL; - } - else if (this->ref) - this->ref->DelReference(this); - this->ref = newref; - if (this->ref) - this->ref->AddReference(this); - } - - virtual inline T *operator->() - { - return this->ref; - } -}; - template<typename T> class service_reference : public dynamic_reference<T> { |
