summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2018-08-12 13:29:09 +0100
committerPeter Powell <petpow@saberuk.com>2018-08-12 13:29:09 +0100
commitf8a9b6ba4ae0b4b3c7b2a408332230dd82eb4608 (patch)
tree775ba30c21683d6b72bfe5c25ce96a213a34da42 /include
parent02838a09396a3626b61263791570e96324563fa0 (diff)
Pass the Extensible container to ExtensionItem::free().
Diffstat (limited to 'include')
-rw-r--r--include/extensible.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/extensible.h b/include/extensible.h
index afb1cd5b6..f88ede461 100644
--- a/include/extensible.h
+++ b/include/extensible.h
@@ -65,7 +65,7 @@ class CoreExport ExtensionItem : public ServiceProvider, public usecountbase
*/
virtual void unserialize(SerializeFormat format, Extensible* container, const std::string& value) = 0;
/** Free the item */
- virtual void free(void* item) = 0;
+ virtual void free(Extensible* container, void* item) = 0;
/** Register this object in the ExtensionManager
*/
@@ -147,7 +147,7 @@ class CoreExport LocalExtItem : public ExtensionItem
virtual ~LocalExtItem();
std::string serialize(SerializeFormat format, const Extensible* container, void* item) const CXX11_OVERRIDE;
void unserialize(SerializeFormat format, Extensible* container, const std::string& value) CXX11_OVERRIDE;
- void free(void* item) CXX11_OVERRIDE = 0;
+ void free(Extensible* container, void* item) CXX11_OVERRIDE = 0;
};
template <typename T, typename Del = stdalgo::defaultdeleter<T> >
@@ -190,7 +190,7 @@ class SimpleExtItem : public LocalExtItem
del(old);
}
- void free(void* item) CXX11_OVERRIDE
+ void free(Extensible* container, void* item) CXX11_OVERRIDE
{
Del del;
del(static_cast<T*>(item));
@@ -216,7 +216,7 @@ class CoreExport LocalIntExt : public LocalExtItem
intptr_t get(const Extensible* container) const;
intptr_t set(Extensible* container, intptr_t value);
void unset(Extensible* container) { set(container, 0); }
- void free(void* item) CXX11_OVERRIDE;
+ void free(Extensible* container, void* item) CXX11_OVERRIDE;
};
class CoreExport StringExtItem : public ExtensionItem
@@ -229,5 +229,5 @@ class CoreExport StringExtItem : public ExtensionItem
void unserialize(SerializeFormat format, Extensible* container, const std::string& value) CXX11_OVERRIDE;
void set(Extensible* container, const std::string& value);
void unset(Extensible* container);
- void free(void* item) CXX11_OVERRIDE;
+ void free(Extensible* container, void* item) CXX11_OVERRIDE;
};