diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2015-01-17 01:36:45 +0100 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-01-19 06:48:42 +0000 |
commit | f5f7a69628ad316298febe7b51234428a7896ff9 (patch) | |
tree | 7a5fedc897db12840a3f560a8564bb05028c60a5 /vcl/win | |
parent | 5f01eb5d7a3927d31b7dd268562a59e3dacdd8e8 (diff) |
fdo#39440 vcl: reduce scope of local variables
This addresses some cppcheck warnings.
Change-Id: Ia3910e7f1b33d16866b7e606fd648f152f9fe67a
Reviewed-on: https://gerrit.libreoffice.org/13971
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'vcl/win')
-rw-r--r-- | vcl/win/source/app/saldata.cxx | 3 | ||||
-rw-r--r-- | vcl/win/source/gdi/gdiimpl.cxx | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/vcl/win/source/app/saldata.cxx b/vcl/win/source/app/saldata.cxx index f149a1629ad2..821790beb0e9 100644 --- a/vcl/win/source/app/saldata.cxx +++ b/vcl/win/source/app/saldata.cxx @@ -52,12 +52,11 @@ OUString ImplSalGetUniString(const sal_Char* pStr, sal_Int32 const nLen) int ImplSalWICompareAscii( const wchar_t* pStr1, const char* pStr2 ) { int nRet; - wchar_t c1; char c2; do { // change to LowerCase if the char is between 'A' and 'Z' - c1 = *pStr1; + wchar_t c1 = *pStr1; c2 = *pStr2; if ( (c1 >= 65) && (c1 <= 90) ) c1 += 32; diff --git a/vcl/win/source/gdi/gdiimpl.cxx b/vcl/win/source/gdi/gdiimpl.cxx index 9601643f9518..16b7d4b1d576 100644 --- a/vcl/win/source/gdi/gdiimpl.cxx +++ b/vcl/win/source/gdi/gdiimpl.cxx @@ -1743,12 +1743,11 @@ void WinSalGraphicsImpl::drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pP // for NT, we can handover the array directly DBG_ASSERT( sizeof( POINT ) == sizeof( SalPoint ), "WinSalGraphicsImpl::DrawPolyPolygon(): POINT != SalPoint" ); - const SalPoint* pPolyAry; UINT n = 0; for ( i = 0; i < (UINT)nPoly; i++ ) { nPoints = pWinPointAry[i]; - pPolyAry = pPtAry[i]; + const SalPoint* pPolyAry = pPtAry[i]; memcpy( pWinPointAryAry+n, pPolyAry, (nPoints-1)*sizeof(POINT) ); pWinPointAryAry[n+nPoints-1] = pWinPointAryAry[n]; n += nPoints; |