Kaydet (Commit) d7515f60 authored tarafından Julien Nabet's avatar Julien Nabet

Simplify AutoOGuardArray + rename private attribute

Change-Id: I9d651303fb80ef5c81d608e56a87cb9548c13f8f
üst 64787ead
...@@ -30,26 +30,23 @@ ...@@ -30,26 +30,23 @@
class AutoOGuardArray class AutoOGuardArray
{ {
sal_Int32 nSize; boost::scoped_ptr< osl::SolarGuard > * mpGuardArray;
boost::scoped_ptr< osl::SolarGuard > * pGuardArray;
public: public:
AutoOGuardArray( sal_Int32 nNumElements ); AutoOGuardArray( sal_Int32 nNumElements );
~AutoOGuardArray(); ~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() AutoOGuardArray::~AutoOGuardArray()
{ {
//!! release auto_ptr's and thus the mutexes locks //!! release auto_ptr's and thus the mutexes locks
delete [] pGuardArray; delete [] mpGuardArray;
} }
......
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