Kaydet (Commit) 5d32a4ac authored tarafından Caolán McNamara's avatar Caolán McNamara

reduce scope, etc, don't loop endlessly

Change-Id: I86e4e94392527b5faf5d9cdb4251853f35813f4e
üst a890a769
...@@ -628,8 +628,6 @@ void CCIDecompressor::StartDecompression( SvStream & rIStream ) ...@@ -628,8 +628,6 @@ void CCIDecompressor::StartDecompression( SvStream & rIStream )
bool CCIDecompressor::DecompressScanline( sal_uInt8 * pTarget, sal_uLong nTargetBits, bool bLastLine ) bool CCIDecompressor::DecompressScanline( sal_uInt8 * pTarget, sal_uLong nTargetBits, bool bLastLine )
{ {
sal_uInt16 i;
sal_uInt8 * pDst;
bool b2D; bool b2D;
if ( nEOLCount >= 5 ) // RTC (Return To Controller) if ( nEOLCount >= 5 ) // RTC (Return To Controller)
...@@ -678,8 +676,7 @@ bool CCIDecompressor::DecompressScanline( sal_uInt8 * pTarget, sal_uLong nTarget ...@@ -678,8 +676,7 @@ bool CCIDecompressor::DecompressScanline( sal_uInt8 * pTarget, sal_uLong nTarget
delete[] pLastLine; delete[] pLastLine;
nLastLineSize = ( nTargetBits + 7 ) >> 3; nLastLineSize = ( nTargetBits + 7 ) >> 3;
pLastLine = new sal_uInt8[ nLastLineSize ]; pLastLine = new sal_uInt8[ nLastLineSize ];
pDst = pLastLine; memset(pLastLine, 0, nLastLineSize);
for ( i = 0; i < nLastLineSize; i++ ) *( pDst++ ) = 0x00;
} }
} }
// conditionally align start of line to next byte: // conditionally align start of line to next byte:
...@@ -706,9 +703,7 @@ bool CCIDecompressor::DecompressScanline( sal_uInt8 * pTarget, sal_uLong nTarget ...@@ -706,9 +703,7 @@ bool CCIDecompressor::DecompressScanline( sal_uInt8 * pTarget, sal_uLong nTarget
// if we're in 2D mode we have to remember the line: // if we're in 2D mode we have to remember the line:
if ( nOptions & CCI_OPTION_2D && bStatus ) if ( nOptions & CCI_OPTION_2D && bStatus )
{ {
sal_uInt8 *pSrc = pTarget; memcpy(pLastLine, pTarget, nLastLineSize);
pDst = pLastLine;
for ( i = 0; i < nLastLineSize; i++ ) *(pDst++)=*(pSrc++);
} }
// #i122984# // #i122984#
......
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