return early

Change-Id: Ia8504fdbc952b1e116bdca135a063d4d98be92be
Reviewed-on: https://gerrit.libreoffice.org/33531
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara
2017-01-25 11:24:36 +00:00
parent 13a9b20457
commit 39ced315aa

View File

@@ -280,25 +280,21 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic )
// ImplGetColor returns various colour values,
// returns TRUE if various colours could be assigned
bool XPMReader::ImplGetColor( sal_uLong nNumb )
{
sal_uInt8* pString = mpStringBuf;
sal_uInt8* pPtr = ( mpColMap + nNumb * ( 4 + mnCpp ) );
bool bStatus = ImplGetString();
if (!ImplGetString())
return false;
if ( bStatus )
{
for ( sal_uLong i = 0; i < mnCpp; i++ )
*pPtr++ = *pString++;
bStatus = ImplGetColSub ( pPtr );
}
sal_uInt8* pPtr = ( mpColMap + nNumb * ( 4 + mnCpp ) );
for (sal_uLong i = 0; i < mnCpp; ++i)
*pPtr++ = *pString++;
bool bStatus = ImplGetColSub(pPtr);
return bStatus;
}
// ImpGetScanLine reads the string mpBufSize and writes the pixel in the
// Bitmap. Parameter nY is the horizontal position.
bool XPMReader::ImplGetScanLine( sal_uLong nY )
{
bool bStatus = ImplGetString();