summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJoseph Powers <jpowers27@cox.net>2011-02-14 07:53:30 -0800
committerJoseph Powers <jpowers27@cox.net>2011-02-14 08:04:38 -0800
commit36587403f86dadf2e9238033724b0a995a651d4c (patch)
tree2be6f2aabcff483b28115d8e15410acb1507e7b5 /tools
parent78a5eaaaa17da3309b272312004209afe4fcae38 (diff)
Merge PRV_SV_DECL_REF_SIGNATURE into PRV_SV_DECL_REF_LOCK
The 2nd macro is the only location in the code where the 1st was used. I think it's easier to read if the 2nd macro has all the code.
Diffstat (limited to 'tools')
-rw-r--r--tools/inc/tools/ref.hxx27
1 files changed, 12 insertions, 15 deletions
diff --git a/tools/inc/tools/ref.hxx b/tools/inc/tools/ref.hxx
index 27b540364079..86c604682b21 100644
--- a/tools/inc/tools/ref.hxx
+++ b/tools/inc/tools/ref.hxx
@@ -34,20 +34,6 @@
//=========================================================================
-#define PRV_SV_DECL_REF_SIGNATURE( ClassName, Ref ) \
- inline ClassName##Ref() { pObj = 0; } \
- inline ClassName##Ref( const ClassName##Ref & rObj ); \
- inline ClassName##Ref( ClassName * pObjP ); \
- inline void Clear(); \
- inline ~ClassName##Ref(); \
- inline ClassName##Ref & operator = ( const ClassName##Ref & rObj ); \
- inline ClassName##Ref & operator = ( ClassName * pObj ); \
- inline BOOL Is() const { return pObj != NULL; } \
- inline ClassName * operator & () const { return pObj; } \
- inline ClassName * operator -> () const { return pObj; } \
- inline ClassName & operator * () const { return *pObj; } \
- inline operator ClassName * () const { return pObj; }
-
#define PRV_SV_IMPL_REF_COUNTERS( ClassName, Ref, AddRef, AddNextRef, ReleaseRef, Init, pRefbase ) \
inline ClassName##Ref::ClassName##Ref( const ClassName##Ref & rObj ) \
{ pObj = rObj.pObj; if( pObj ) { Init pRefbase->AddNextRef; } } \
@@ -80,7 +66,18 @@ inline ClassName##Ref & ClassName##Ref::operator = ( ClassName * pObjP ) \
protected: \
ClassName * pObj; \
public: \
-PRV_SV_DECL_REF_SIGNATURE(ClassName, Ref)
+ inline ClassName##Ref() { pObj = 0; } \
+ inline ClassName##Ref( const ClassName##Ref & rObj ); \
+ inline ClassName##Ref( ClassName * pObjP ); \
+ inline void Clear(); \
+ inline ~ClassName##Ref(); \
+ inline ClassName##Ref & operator = ( const ClassName##Ref & rObj ); \
+ inline ClassName##Ref & operator = ( ClassName * pObj ); \
+ inline BOOL Is() const { return pObj != NULL; } \
+ inline ClassName * operator & () const { return pObj; } \
+ inline ClassName * operator -> () const { return pObj; } \
+ inline ClassName & operator * () const { return *pObj; } \
+ inline operator ClassName * () const { return pObj; }
#define PRV_SV_DECL_REF( ClassName ) \
PRV_SV_DECL_REF_LOCK( ClassName, Ref )