]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/base.cpp
Improve escaping strings in the MySQL module.
[user/henk/code/inspircd.git] / src / base.cpp
index afd561ff231d2f528068faa793a90e9f070dc084..ebd5214dbfee6d3738dfb6b31d15e68a3999f0fe 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)
 {
 }
 
@@ -378,13 +369,13 @@ void StringExtItem::FromNetwork(Extensible* container, const std::string& value)
 void StringExtItem::set(Extensible* container, const std::string& value)
 {
        void* old = set_raw(container, new std::string(value));
-       delete static_cast<std::string*>(old);
+       free(container, old);
 }
 
 void StringExtItem::unset(Extensible* container)
 {
        void* old = unset_raw(container);
-       delete static_cast<std::string*>(old);
+       free(container, old);
 }
 
 void StringExtItem::free(Extensible* container, void* item)