From d5e36aa2b2ca26fe689ae9e29c74b3565dd018c7 Mon Sep 17 00:00:00 2001 From: danieldg Date: Mon, 28 Sep 2009 00:55:42 +0000 Subject: Fix warnings from BSD build and work around the failures of BSD make git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11771 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/extensible.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include/extensible.h') diff --git a/include/extensible.h b/include/extensible.h index d3d22a97e..10e96d875 100644 --- a/include/extensible.h +++ b/include/extensible.h @@ -21,6 +21,7 @@ class CoreExport ExtensionItem const std::string key; Module* const owner; ExtensionItem(const std::string& key, Module* owner); + virtual ~ExtensionItem(); /** Serialize this item into a string * * @param format The format to serialize to @@ -83,7 +84,7 @@ class CoreExport Extensible : public classbase static bool Register(ExtensionItem* item); static std::vector BeginUnregister(Module* module); void doUnhookExtensions(const std::vector& toRemove); - + // Friend access for the protected getter/setter friend class ExtensionItem; }; @@ -93,6 +94,7 @@ class CoreExport LocalExtItem : public ExtensionItem { public: LocalExtItem(const std::string& key, Module* owner); + virtual ~LocalExtItem(); virtual std::string serialize(SerializeFormat format, const Extensible* container, void* item); virtual void unserialize(SerializeFormat format, Extensible* container, const std::string& value); virtual void free(void* item) = 0; @@ -106,6 +108,10 @@ class CoreExport SimpleExtItem : public LocalExtItem { } + virtual ~SimpleExtItem() + { + } + inline T* get(const Extensible* container) { return static_cast(get_raw(container)); @@ -151,6 +157,7 @@ class CoreExport LocalStringExt : public SimpleExtItem { public: LocalStringExt(const std::string& key, Module* owner); + virtual ~LocalStringExt(); std::string serialize(SerializeFormat format, const Extensible* container, void* item); }; @@ -158,6 +165,7 @@ class CoreExport LocalIntExt : public LocalExtItem { public: LocalIntExt(const std::string& key, Module* owner); + virtual ~LocalIntExt(); std::string serialize(SerializeFormat format, const Extensible* container, void* item); intptr_t get(const Extensible* container); intptr_t set(Extensible* container, intptr_t value); @@ -168,6 +176,7 @@ class CoreExport StringExtItem : public ExtensionItem { public: StringExtItem(const std::string& key, Module* owner); + virtual ~StringExtItem(); std::string* get(const Extensible* container); std::string serialize(SerializeFormat format, const Extensible* container, void* item); void unserialize(SerializeFormat format, Extensible* container, const std::string& value); -- cgit v1.2.3