summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2012-09-15 15:16:04 +0200
committerJulien Nabet <serval2412@yahoo.fr>2012-09-15 15:16:04 +0200
commitd7515f60dc0ebb54fb2db7de46b3579963698e6a (patch)
treeb3914e715f6856d4a4abec54bebf3b2445b8b218
parent64787ead29124860841e892b66319979e13ee61e (diff)
Simplify AutoOGuardArray + rename private attribute
Change-Id: I9d651303fb80ef5c81d608e56a87cb9548c13f8f
-rw-r--r--comphelper/source/property/MasterPropertySet.cxx11
1 files changed, 4 insertions, 7 deletions
diff --git a/comphelper/source/property/MasterPropertySet.cxx b/comphelper/source/property/MasterPropertySet.cxx
index 1f353cc3f4f6..1cc524b95a88 100644
--- a/comphelper/source/property/MasterPropertySet.cxx
+++ b/comphelper/source/property/MasterPropertySet.cxx
@@ -30,26 +30,23 @@
class AutoOGuardArray
{
- sal_Int32 nSize;
- boost::scoped_ptr< osl::SolarGuard > * pGuardArray;
+ boost::scoped_ptr< osl::SolarGuard > * mpGuardArray;
public:
AutoOGuardArray( sal_Int32 nNumElements );
~AutoOGuardArray();
- boost::scoped_ptr< osl::SolarGuard > & operator[] ( sal_Int32 i ) { return pGuardArray[i]; }
+ boost::scoped_ptr< osl::SolarGuard > & operator[] ( sal_Int32 i ) { return mpGuardArray[i]; }
};
-AutoOGuardArray::AutoOGuardArray( sal_Int32 nNumElements )
+AutoOGuardArray::AutoOGuardArray( sal_Int32 nNumElements ) : mpGuardArray(new boost::scoped_ptr< osl::SolarGuard >[nNumElements])
{
- nSize = nNumElements;
- pGuardArray = new boost::scoped_ptr< osl::SolarGuard >[ nSize ];
}
AutoOGuardArray::~AutoOGuardArray()
{
//!! release auto_ptr's and thus the mutexes locks
- delete [] pGuardArray;
+ delete [] mpGuardArray;
}