]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Convert LocalExtItem to a typedef and deprecate it.
authorPeter Powell <petpow@saberuk.com>
Tue, 13 Aug 2019 13:03:51 +0000 (14:03 +0100)
committerPeter Powell <petpow@saberuk.com>
Tue, 13 Aug 2019 14:02:25 +0000 (15:02 +0100)
include/extensible.h
src/base.cpp
src/modules/extra/m_geo_maxmind.cpp

index 9df6d3e187c9a38ea5f4f91d3ca5a0c1ae5c72c3..0efb1db5f133ab7fe782db983da7f4a74c2cd396 100644 (file)
@@ -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 <typename T, typename Del = stdalgo::defaultdeleter<T> >
-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<std::string>
        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);
index afd561ff231d2f528068faa793a90e9f070dc084..b4ea09bc9b330f6393c0c821ad03e66560cc2788 100644 (file)
@@ -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<std::string>(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)
 {
 }
 
index 767d0011469c6d4fbff6c7c8656fc8c37a13f545..b964a393ceb561f64438124149a519b3bf8f0581 100644 (file)
 #include "modules/geolocation.h"
 #include <maxminddb.h>
 
-class GeolocationExtItem : public LocalExtItem
+class GeolocationExtItem : public ExtensionItem
 {
  public:
        GeolocationExtItem(Module* parent)
-               : LocalExtItem("geolocation", ExtensionItem::EXT_USER, parent)
+               : ExtensionItem("geolocation", ExtensionItem::EXT_USER, parent)
        {
        }