diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-09-19 21:18:23 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-09-20 07:55:10 +0200 |
commit | 07339d03afe742c53c22cb4ff5f73fe3132cff54 (patch) | |
tree | c746a8f0eea7ca16d6b6756b604303eefbf550e7 /include | |
parent | ece7079f77efea3fcbd205209fb16f6c9a12bf3f (diff) |
Remove obsolete workaround for SUNPRO 5 compiler
...copy/pasted into three more places
Change-Id: I6661244d0248af509cd867fc3e8c451551068a78
Diffstat (limited to 'include')
-rw-r--r-- | include/comphelper/proparrhlp.hxx | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/include/comphelper/proparrhlp.hxx b/include/comphelper/proparrhlp.hxx index 0f8fe7ebc36a..507c51b6618d 100644 --- a/include/comphelper/proparrhlp.hxx +++ b/include/comphelper/proparrhlp.hxx @@ -45,18 +45,7 @@ protected: public: OPropertyArrayUsageHelper(); - virtual ~OPropertyArrayUsageHelper() - { // ARGHHHHHHH ..... would like to implement this after the class - // definition (as we do with all other methods) but SUNPRO 5 compiler - // (linker) doesn't like this - ::osl::MutexGuard aGuard(OPropertyArrayUsageHelperMutex<TYPE>::get()); - OSL_ENSURE(s_nRefCount > 0, "OPropertyArrayUsageHelper::~OPropertyArrayUsageHelper : suspicious call : have a refcount of 0 !"); - if (!--s_nRefCount) - { - delete s_pProps; - s_pProps = nullptr; - } - } + virtual ~OPropertyArrayUsageHelper(); /** call this in the getInfoHelper method of your derived class. The method returns the array helper of the class, which is created if necessary. @@ -125,6 +114,18 @@ OPropertyArrayUsageHelper<TYPE>::OPropertyArrayUsageHelper() } template <class TYPE> +OPropertyArrayUsageHelper<TYPE>::~OPropertyArrayUsageHelper() +{ + ::osl::MutexGuard aGuard(OPropertyArrayUsageHelperMutex<TYPE>::get()); + OSL_ENSURE(s_nRefCount > 0, "OPropertyArrayUsageHelper::~OPropertyArrayUsageHelper : suspicious call : have a refcount of 0 !"); + if (!--s_nRefCount) + { + delete s_pProps; + s_pProps = nullptr; + } +} + +template <class TYPE> ::cppu::IPropertyArrayHelper* OPropertyArrayUsageHelper<TYPE>::getArrayHelper() { OSL_ENSURE(s_nRefCount, "OPropertyArrayUsageHelper::getArrayHelper : suspicious call : have a refcount of 0 !"); |