diff options
author | Adam <Adam@anope.org> | 2011-01-17 15:46:53 -0500 |
---|---|---|
committer | Adam <Adam@anope.org> | 2011-01-17 15:46:53 -0500 |
commit | 8975b52cc3087db9504de7ad6e707234cb158a36 (patch) | |
tree | d666c5abe448e5451edbd9c0993a46f28cbc6c04 /include/extensible.h | |
parent | 7acbbbbf5b661fd2d7b42f3e3adaea949f68cbef (diff) |
Added ns_ajoin
Diffstat (limited to 'include/extensible.h')
-rw-r--r-- | include/extensible.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/include/extensible.h b/include/extensible.h index 62413f131..2d7fb5509 100644 --- a/include/extensible.h +++ b/include/extensible.h @@ -28,7 +28,7 @@ template<typename T> class ExtensibleItemRegular : public ExtensibleItemBase public: ExtensibleItemRegular(T item) : Item(item) { } virtual ~ExtensibleItemRegular() { } - T GetItem() const { return Item; } + T &GetItem() { return Item; } }; /** Class used to represent an extensible item that holds a pointer @@ -41,7 +41,7 @@ template<typename T> class ExtensibleItemPointer : public ExtensibleItemBase public: ExtensibleItemPointer(T *item) : Item(item) { } virtual ~ExtensibleItemPointer() { delete Item; } - T *GetItem() const { return Item; } + T *GetItem() { return Item; } }; /** Class used to represent an extensible item that holds a pointer to an arrray @@ -54,7 +54,7 @@ template<typename T> class ExtensibleItemPointerArray : public ExtensibleItemBas public: ExtensibleItemPointerArray(T *item) : Item(item) { } virtual ~ExtensibleItemPointerArray() { delete [] Item; } - T *GetItem() const { return Item; } + T *GetItem() { return Item; } }; class CoreExport Extensible : public Base @@ -108,7 +108,7 @@ class CoreExport Extensible : public Base */ void Extend(const Anope::string &key) { - this->Extend(key, new ExtensibleItemRegular<char *>(NULL)); + this->Extend(key, new ExtensibleItemPointer<char *>(NULL)); } /** Shrink an Extensible class. |