Kaydet (Commit) 07339d03 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Remove obsolete workaround for SUNPRO 5 compiler

...copy/pasted into three more places

Change-Id: I6661244d0248af509cd867fc3e8c451551068a78
üst ece7079f
......@@ -68,17 +68,7 @@ namespace connectivity
public:
OPropertyArrayUsageHelper();
virtual ~OPropertyArrayUsageHelper()
{ // ARGHHHHHHH ..... would like to implement this in proparrhlp_impl.hxx (as we do with all other methods)
// but SUNPRO 5 compiler (linker) doesn't like this
::osl::MutexGuard aGuard(s_aMutex);
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.
......@@ -116,6 +106,19 @@ namespace connectivity
}
template <class TYPE>
OPropertyArrayUsageHelper<TYPE>::~OPropertyArrayUsageHelper()
{
::osl::MutexGuard aGuard(s_aMutex);
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()
{
......
......@@ -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.
......@@ -124,6 +113,18 @@ OPropertyArrayUsageHelper<TYPE>::OPropertyArrayUsageHelper()
++s_nRefCount;
}
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()
{
......
......@@ -100,17 +100,7 @@ namespace connectivity
public:
OPropertyArrayUsageHelper();
virtual ~OPropertyArrayUsageHelper()
{ // ARGHHHHHHH ..... would like to implement this in proparrhlp_impl.hxx (as we do with all other methods)
// but SUNPRO 5 compiler (linker) doesn't like this
::osl::MutexGuard aGuard(s_aMutex);
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.
......@@ -146,6 +136,18 @@ namespace connectivity
++s_nRefCount;
}
template <class TYPE>
OPropertyArrayUsageHelper<TYPE>::~OPropertyArrayUsageHelper()
{
::osl::MutexGuard aGuard(s_aMutex);
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()
{
......
......@@ -117,17 +117,7 @@ namespace connectivity
public:
OPropertyArrayUsageHelper();
virtual ~OPropertyArrayUsageHelper()
{ // ARGHHHHHHH ..... would like to implement this in proparrhlp_impl.hxx (as we do with all other methods)
// but SUNPRO 5 compiler (linker) doesn't like this
::osl::MutexGuard aGuard(s_aMutex);
OSL_ENSURE(s_nRefCount > 0, "OPropertyArrayUsageHelper::~OPropertyArrayUsageHelper : suspicious call : have a refcount of 0 !");
if (!--s_nRefCount)
{
delete s_pProps;
s_pProps = NULL;
}
}
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.
......@@ -163,6 +153,18 @@ namespace connectivity
++s_nRefCount;
}
template <class TYPE>
OPropertyArrayUsageHelper<TYPE>::~OPropertyArrayUsageHelper()
{
::osl::MutexGuard aGuard(s_aMutex);
OSL_ENSURE(s_nRefCount > 0, "OPropertyArrayUsageHelper::~OPropertyArrayUsageHelper : suspicious call : have a refcount of 0 !");
if (!--s_nRefCount)
{
delete s_pProps;
s_pProps = NULL;
}
}
template <class TYPE>
::cppu::IPropertyArrayHelper* OPropertyArrayUsageHelper<TYPE>::getArrayHelper()
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment