[Libreoffice-commits] core.git: vcl/opengl vcl/win

Stephan Bergmann sbergman at redhat.com
Tue Apr 4 12:07:57 UTC 2017


 vcl/opengl/win/WinDeviceInfo.cxx |    3 +--
 vcl/win/gdi/gdiimpl.cxx          |    3 +--
 2 files changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 3afca328510a9ddaf67ca578af0cbce25fa44aec
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Apr 4 10:03:03 2017 +0200

    loplugin:loopvartoosmall (clang-cl)
    
    Change-Id: Ibdfdc5c66cf1e81d9e43c94df31120c476a78572
    Reviewed-on: https://gerrit.libreoffice.org/36064
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/vcl/opengl/win/WinDeviceInfo.cxx b/vcl/opengl/win/WinDeviceInfo.cxx
index fcf3347a1e7a..19b5af00bf9c 100644
--- a/vcl/opengl/win/WinDeviceInfo.cxx
+++ b/vcl/opengl/win/WinDeviceInfo.cxx
@@ -409,8 +409,7 @@ bool WinOpenGLDeviceInfo::FindBlocklistedDeviceInList(std::vector<wgl::DriverInf
 
     wgl::OperatingSystem eOS = WindowsVersionToOperatingSystem(nWindowsVersion);
     bool match = false;
-    uint32_t i = 0;
-    for (; i < aDeviceInfos.size(); i++)
+    for (std::vector<wgl::DriverInfo>::size_type i = 0; i < aDeviceInfos.size(); i++)
     {
         if (aDeviceInfos[i].meOperatingSystem != wgl::DRIVER_OS_ALL &&
                 aDeviceInfos[i].meOperatingSystem != eOS)
diff --git a/vcl/win/gdi/gdiimpl.cxx b/vcl/win/gdi/gdiimpl.cxx
index b51c2f700a7d..c2278538f582 100644
--- a/vcl/win/gdi/gdiimpl.cxx
+++ b/vcl/win/gdi/gdiimpl.cxx
@@ -73,7 +73,6 @@ void ImplRenderPath( HDC hdc, sal_uLong nPoints, const SalPoint* pPtAry, const P
 {
     if( nPoints )
     {
-        sal_uInt16 i;
         // TODO: profile whether the following options are faster:
         // a) look ahead and draw consecutive bezier or line segments by PolyBezierTo/PolyLineTo resp.
         // b) convert our flag array to window's and use PolyDraw
@@ -81,7 +80,7 @@ void ImplRenderPath( HDC hdc, sal_uLong nPoints, const SalPoint* pPtAry, const P
         MoveToEx( hdc, pPtAry->mnX, pPtAry->mnY, nullptr );
         ++pPtAry; ++pFlgAry;
 
-        for( i=1; i<nPoints; ++i, ++pPtAry, ++pFlgAry )
+        for( sal_uLong i=1; i<nPoints; ++i, ++pPtAry, ++pFlgAry )
         {
             if( *pFlgAry != PolyFlags::Control )
             {


More information about the Libreoffice-commits mailing list