summaryrefslogtreecommitdiff
path: root/vcl/win/gdi
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-07-17 17:27:02 +0200
committerStephan Bergmann <sbergman@redhat.com>2017-07-17 17:27:55 +0200
commitd4bda10ceef4502ce4717368c6a39ecd709cff7f (patch)
treee29dcbe63879719ebdda236aa5eab5b6ceaa7499 /vcl/win/gdi
parent7243c13bdd4cbc528673b658faea6772077fa1f6 (diff)
loplugin:unnecessaryparen: vcl (clang-cl)
Change-Id: I3d31a5b56007451a9982602b488ae6ac1baf1f50
Diffstat (limited to 'vcl/win/gdi')
-rw-r--r--vcl/win/gdi/salbmp.cxx8
-rw-r--r--vcl/win/gdi/salprn.cxx2
2 files changed, 7 insertions, 3 deletions
diff --git a/vcl/win/gdi/salbmp.cxx b/vcl/win/gdi/salbmp.cxx
index 98b59e771c74..e8f1a1fa99fb 100644
--- a/vcl/win/gdi/salbmp.cxx
+++ b/vcl/win/gdi/salbmp.cxx
@@ -42,6 +42,10 @@
#include <gdiplus.h>
#include "postwin.h"
+#if defined _MSC_VER
+#undef min
+#undef max
+#endif
inline void ImplSetPixel4( sal_uInt8* pScanline, long nX, const BYTE cIndex )
{
@@ -762,7 +766,7 @@ HGLOBAL WinSalBitmap::ImplCreateDIB( const Size& rSize, sal_uInt16 nBits, const
if( nColors )
{
// copy the palette entries if any
- const sal_uInt16 nMinCount = (std::min)( nColors, rPal.GetEntryCount() );
+ const sal_uInt16 nMinCount = std::min( nColors, rPal.GetEntryCount() );
if( nMinCount )
memcpy( pBI->bmiColors, rPal.ImplGetColorBuffer(), nMinCount * sizeof(RGBQUAD) );
}
@@ -944,7 +948,7 @@ void WinSalBitmap::ReleaseBuffer( BitmapBuffer* pBuffer, BitmapAccessMode nMode
PBITMAPINFO pBI = static_cast<PBITMAPINFO>(GlobalLock( mhDIB ));
const sal_uInt16 nCount = pBuffer->maPalette.GetEntryCount();
const sal_uInt16 nDIBColorCount = ImplGetDIBColorCount( mhDIB );
- memcpy( pBI->bmiColors, pBuffer->maPalette.ImplGetColorBuffer(), (std::min)( nDIBColorCount, nCount ) * sizeof( RGBQUAD ) );
+ memcpy( pBI->bmiColors, pBuffer->maPalette.ImplGetColorBuffer(), std::min( nDIBColorCount, nCount ) * sizeof( RGBQUAD ) );
GlobalUnlock( mhDIB );
}
diff --git a/vcl/win/gdi/salprn.cxx b/vcl/win/gdi/salprn.cxx
index 11731ddd657d..44cc665c94b4 100644
--- a/vcl/win/gdi/salprn.cxx
+++ b/vcl/win/gdi/salprn.cxx
@@ -685,7 +685,7 @@ static void ImplDevModeToJobSetup( WinSalInfoPrinter* pPrinter, ImplJobSetup* pS
if( nFlags & JobSetFlags::DUPLEXMODE )
{
DuplexMode eDuplex = DuplexMode::Unknown;
- if( (pDevModeW->dmFields & DM_DUPLEX) )
+ if( pDevModeW->dmFields & DM_DUPLEX )
{
if( pDevModeW->dmDuplex == DMDUP_SIMPLEX )
eDuplex = DuplexMode::Off;