From 9db7af579c46a9f0379fdf71fb773a0a76a94846 Mon Sep 17 00:00:00 2001 From: danieldg Date: Sat, 17 Oct 2009 18:52:39 +0000 Subject: Make classbase and refcountbase uncopyable; expand comments on their indended uses git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11888 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/base.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'src/base.cpp') diff --git a/src/base.cpp b/src/base.cpp index 1b01da707..2e2dbfb28 100644 --- a/src/base.cpp +++ b/src/base.cpp @@ -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& 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) -- cgit v1.2.3