From: Peter Powell Date: Tue, 13 Aug 2019 13:03:51 +0000 (+0100) Subject: Convert LocalExtItem to a typedef and deprecate it. X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=703ba72071b970caaa7554b1e58a13def57694dc;p=user%2Fhenk%2Fcode%2Finspircd.git Convert LocalExtItem to a typedef and deprecate it. --- diff --git a/include/extensible.h b/include/extensible.h index 9df6d3e18..0efb1db5f 100644 --- a/include/extensible.h +++ b/include/extensible.h @@ -185,21 +185,15 @@ class CoreExport ExtensionManager ExtMap types; }; -/** Base class for items that are NOT synchronized between servers */ -class CoreExport LocalExtItem : public ExtensionItem -{ - public: - LocalExtItem(const std::string& key, ExtensibleType exttype, Module* owner); - virtual ~LocalExtItem(); - void free(Extensible* container, void* item) CXX11_OVERRIDE = 0; -}; +/** DEPRECATED: use ExtensionItem instead. */ +typedef ExtensionItem LocalExtItem; template > -class SimpleExtItem : public LocalExtItem +class SimpleExtItem : public ExtensionItem { public: SimpleExtItem(const std::string& Key, ExtensibleType exttype, Module* parent) - : LocalExtItem(Key, exttype, parent) + : ExtensionItem(Key, exttype, parent) { } @@ -250,7 +244,7 @@ class CoreExport LocalStringExt : public SimpleExtItem void FromInternal(Extensible* container, const std::string& value) CXX11_OVERRIDE; }; -class CoreExport LocalIntExt : public LocalExtItem +class CoreExport LocalIntExt : public ExtensionItem { public: LocalIntExt(const std::string& key, ExtensibleType exttype, Module* owner); diff --git a/src/base.cpp b/src/base.cpp index afd561ff2..b4ea09bc9 100644 --- a/src/base.cpp +++ b/src/base.cpp @@ -284,15 +284,6 @@ void ExtensionItem::unserialize(SerializeFormat format, Extensible* container, c } } -LocalExtItem::LocalExtItem(const std::string& Key, ExtensibleType exttype, Module* mod) - : ExtensionItem(Key, exttype, mod) -{ -} - -LocalExtItem::~LocalExtItem() -{ -} - LocalStringExt::LocalStringExt(const std::string& Key, ExtensibleType exttype, Module* Owner) : SimpleExtItem(Key, exttype, Owner) { @@ -313,7 +304,7 @@ void LocalStringExt::FromInternal(Extensible* container, const std::string& valu } LocalIntExt::LocalIntExt(const std::string& Key, ExtensibleType exttype, Module* mod) - : LocalExtItem(Key, exttype, mod) + : ExtensionItem(Key, exttype, mod) { } diff --git a/src/modules/extra/m_geo_maxmind.cpp b/src/modules/extra/m_geo_maxmind.cpp index 767d00114..b964a393c 100644 --- a/src/modules/extra/m_geo_maxmind.cpp +++ b/src/modules/extra/m_geo_maxmind.cpp @@ -32,11 +32,11 @@ #include "modules/geolocation.h" #include -class GeolocationExtItem : public LocalExtItem +class GeolocationExtItem : public ExtensionItem { public: GeolocationExtItem(Module* parent) - : LocalExtItem("geolocation", ExtensionItem::EXT_USER, parent) + : ExtensionItem("geolocation", ExtensionItem::EXT_USER, parent) { }