initialize mnRefCount members directly in ctors
Change-Id: I7b4ff643eb256519bc47d27f6e0a6a60aaf8768e
This commit is contained in:
parent
811e6f6745
commit
29a95776c3
@ -168,7 +168,6 @@ void Image::ImplInit( const BitmapEx& rBmpEx )
|
||||
if( !rBmpEx.IsEmpty() )
|
||||
{
|
||||
mpImplData = new ImplImage;
|
||||
mpImplData->mnRefCount = 1;
|
||||
|
||||
if( rBmpEx.GetTransparentType() == TRANSPARENT_NONE )
|
||||
{
|
||||
@ -365,7 +364,6 @@ ImageList::ImageList( const ImageList& rImageList ) :
|
||||
|
||||
ImageList::~ImageList()
|
||||
{
|
||||
|
||||
if( mpImplData && ( 0 == --mpImplData->mnRefCount ) )
|
||||
delete mpImplData;
|
||||
}
|
||||
@ -373,7 +371,6 @@ ImageList::~ImageList()
|
||||
void ImageList::ImplInit( sal_uInt16 nItems, const Size &rSize )
|
||||
{
|
||||
mpImplData = new ImplImageList;
|
||||
mpImplData->mnRefCount = 1;
|
||||
mpImplData->maImages.reserve( nItems );
|
||||
mpImplData->maImageSize = rSize;
|
||||
}
|
||||
|
@ -58,13 +58,14 @@ ImageAryData& ImageAryData::operator=( const ImageAryData& rData )
|
||||
}
|
||||
|
||||
ImplImageList::ImplImageList()
|
||||
: mnRefCount(1)
|
||||
{
|
||||
}
|
||||
|
||||
ImplImageList::ImplImageList( const ImplImageList &aSrc ) :
|
||||
maPrefix( aSrc.maPrefix ),
|
||||
maImageSize( aSrc.maImageSize ),
|
||||
mnRefCount( 1 )
|
||||
ImplImageList::ImplImageList( const ImplImageList &aSrc )
|
||||
: maPrefix(aSrc.maPrefix)
|
||||
, maImageSize(aSrc.maImageSize)
|
||||
, mnRefCount(1)
|
||||
{
|
||||
maImages.reserve( aSrc.maImages.size() );
|
||||
for ( ImageAryDataVec::const_iterator aIt = aSrc.maImages.begin(), aEnd = aSrc.maImages.end(); aIt != aEnd; ++aIt )
|
||||
@ -116,6 +117,7 @@ sal_Bool ImplImageData::IsEqual( const ImplImageData& rData )
|
||||
}
|
||||
|
||||
ImplImage::ImplImage()
|
||||
: mnRefCount(1)
|
||||
{
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user