diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-10-14 20:38:13 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-10-15 09:27:56 +0200 |
commit | 48d7212600f9dd9210c77a553b6d7cb83976c356 (patch) | |
tree | 6dd599c3bec7056e65111755be2395ca50b0be0d /include | |
parent | 5d04fd117ab2519edd78a852f41d1be1e45da290 (diff) |
Some clean-up
Change-Id: I5f99e79e21bd33561dab10cb7044f2fa148ef156
Diffstat (limited to 'include')
-rw-r--r-- | include/tools/ref.hxx | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/include/tools/ref.hxx b/include/tools/ref.hxx index ac7a42bc2e3e..3c427cbb6406 100644 --- a/include/tools/ref.hxx +++ b/include/tools/ref.hxx @@ -22,11 +22,11 @@ #include "tools/toolsdllapi.h" #include <vector> -#define PRV_SV_IMPL_REF_COUNTERS( ClassName, Ref, AddRef, AddNextRef, ReleaseRef, Init, pRefbase ) \ +#define PRV_SV_IMPL_REF_COUNTERS( ClassName, Ref, AddRef, AddNextRef, ReleaseRef, pRefbase ) \ inline ClassName##Ref::ClassName##Ref( const ClassName##Ref & rObj ) \ - { pObj = rObj.pObj; if( pObj ) { Init pRefbase->AddNextRef; } } \ + { pObj = rObj.pObj; if( pObj ) { pRefbase->AddNextRef; } } \ inline ClassName##Ref::ClassName##Ref( ClassName * pObjP ) \ -{ pObj = pObjP; if( pObj ) { Init pRefbase->AddRef; } } \ +{ pObj = pObjP; if( pObj ) { pRefbase->AddRef; } } \ inline void ClassName##Ref::Clear() \ { \ if( pObj ) \ @@ -44,7 +44,7 @@ inline ClassName##Ref & ClassName##Ref:: \ if( rObj.pObj ) rObj.pRefbase->AddNextRef; \ ClassName* const pRefObj = pRefbase; \ pObj = rObj.pObj; \ - Init if( pRefObj ) { pRefObj->ReleaseRef; } \ + if( pRefObj ) { pRefObj->ReleaseRef; } \ return *this; \ } \ inline ClassName##Ref & ClassName##Ref::operator = ( ClassName * pObjP ) \ @@ -86,12 +86,12 @@ class ClassName##Lock \ #define SV_IMPL_REF( ClassName ) \ PRV_SV_IMPL_REF_COUNTERS( ClassName, Ref, AddRef(), AddNextRef(),\ - ReleaseReference(), EMPTYARG, pObj ) + ReleaseReference(), pObj ) #define SV_IMPL_LOCK( ClassName ) \ PRV_SV_IMPL_REF_COUNTERS( ClassName, Lock, OwnerLock( sal_True ), \ OwnerLock( sal_True ), OwnerLock( sal_False ), \ - EMPTYARG, pObj ) + pObj ) #define SV_DECL_IMPL_REF(ClassName) \ SV_DECL_REF(ClassName) \ @@ -174,7 +174,6 @@ public: if( nRefCount < SV_NO_DELETE_REFCOUNT ) nRefCount += SV_NO_DELETE_REFCOUNT; } - sal_uIntPtr AddMulRef( sal_uIntPtr n ) { return nRefCount += n; } sal_uIntPtr AddNextRef() { return ++nRefCount; } sal_uIntPtr AddRef() { @@ -197,10 +196,6 @@ public: sal_uIntPtr GetRefCount() const { return nRefCount; } }; -#ifndef EMPTYARG -#define EMPTYARG -#endif - SV_DECL_IMPL_REF(SvRefBase) class SvCompatWeakHdl : public SvRefBase |