Kaydet (Commit) 0b27b03d authored tarafından Fridrich Štrba's avatar Fridrich Štrba

min -> std::min in order to unbreak windows build

Change-Id: I4b7b2acf0f1c3173393841ae1047240e991fb837
üst e9fd9c25
...@@ -808,7 +808,7 @@ HGLOBAL WinSalBitmap::ImplCreateDIB( const Size& rSize, sal_uInt16 nBits, const ...@@ -808,7 +808,7 @@ HGLOBAL WinSalBitmap::ImplCreateDIB( const Size& rSize, sal_uInt16 nBits, const
if( nColors ) if( nColors )
{ {
// copy the palette entries if any // copy the palette entries if any
const sal_uInt16 nMinCount = min( nColors, rPal.GetEntryCount() ); const sal_uInt16 nMinCount = std::min( nColors, rPal.GetEntryCount() );
if( nMinCount ) if( nMinCount )
memcpy( pBI->bmiColors, rPal.ImplGetColorBuffer(), nMinCount * sizeof(RGBQUAD) ); memcpy( pBI->bmiColors, rPal.ImplGetColorBuffer(), nMinCount * sizeof(RGBQUAD) );
} }
...@@ -976,7 +976,7 @@ void WinSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ) ...@@ -976,7 +976,7 @@ void WinSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly )
PBITMAPINFO pBI = (PBITMAPINFO) GlobalLock( mhDIB ); PBITMAPINFO pBI = (PBITMAPINFO) GlobalLock( mhDIB );
const sal_uInt16 nCount = pBuffer->maPalette.GetEntryCount(); const sal_uInt16 nCount = pBuffer->maPalette.GetEntryCount();
const sal_uInt16 nDIBColorCount = ImplGetDIBColorCount( mhDIB ); const sal_uInt16 nDIBColorCount = ImplGetDIBColorCount( mhDIB );
memcpy( pBI->bmiColors, pBuffer->maPalette.ImplGetColorBuffer(), min( nDIBColorCount, nCount ) * sizeof( RGBQUAD ) ); memcpy( pBI->bmiColors, pBuffer->maPalette.ImplGetColorBuffer(), std::min( nDIBColorCount, nCount ) * sizeof( RGBQUAD ) );
GlobalUnlock( mhDIB ); GlobalUnlock( mhDIB );
} }
......
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