]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/base.cpp
Make classbase and refcountbase uncopyable; expand comments on their indended uses
[user/henk/code/inspircd.git] / src / base.cpp
index 1b01da70710ab1948ea5c25dd834474c1e39eab4..2e2dbfb287d365c78e3022e8c5c5089dca02884d 100644 (file)
@@ -22,22 +22,21 @@ classbase::classbase()
 {
 }
 
-bool classbase::cull()
+CullResult classbase::cull()
 {
-       return true;
+       return CullResult();
 }
 
 classbase::~classbase()
 {
 }
 
-refcountbase::refcountbase() : refcount(0)
+CullResult::CullResult()
 {
 }
 
-bool refcountbase::cull()
+refcountbase::refcountbase() : refcount(0)
 {
-       return (refcount == 0);
 }
 
 refcountbase::~refcountbase()
@@ -129,12 +128,17 @@ void Extensible::doUnhookExtensions(const std::vector<ExtensionItem*>& toRemove)
        }
 }
 
-Extensible::~Extensible()
+CullResult Extensible::cull()
 {
        for(ExtensibleStore::iterator i = extensions.begin(); i != extensions.end(); ++i)
        {
                i->first->free(i->second);      
        }
+       return classbase::cull();
+}
+
+Extensible::~Extensible()
+{
 }
 
 LocalExtItem::LocalExtItem(const std::string& Key, Module* mod) : ExtensionItem(Key, mod)