From f8a9b6ba4ae0b4b3c7b2a408332230dd82eb4608 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Sun, 12 Aug 2018 13:29:09 +0100 Subject: Pass the Extensible container to ExtensionItem::free(). --- include/extensible.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include') 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 > @@ -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(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; }; -- cgit v1.2.3