diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-07-03 14:04:23 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-07-03 14:04:23 +0200 |
commit | d6b625058404cfc0bbccf8180c27419812f8d7ba (patch) | |
tree | 23c6f2199cc87efef37ff4f15beb1598b6d3bc7d | |
parent | 1e5e504b2f88fb29a823663fae505863ac00f593 (diff) |
loplugin:oncevar (clang-cl): vcl
Change-Id: I0459978c2cfb61cd7251f0e8d9a30f1f19c02c11
-rw-r--r-- | vcl/opengl/win/WinDeviceInfo.cxx | 6 | ||||
-rw-r--r-- | vcl/qa/cppunit/blocklistparsertest.cxx | 10 | ||||
-rw-r--r-- | vcl/win/app/salinfo.cxx | 4 | ||||
-rw-r--r-- | vcl/win/app/saltimer.cxx | 2 | ||||
-rw-r--r-- | vcl/win/gdi/salfont.cxx | 2 | ||||
-rw-r--r-- | vcl/win/gdi/salgdi.cxx | 2 |
6 files changed, 11 insertions, 15 deletions
diff --git a/vcl/opengl/win/WinDeviceInfo.cxx b/vcl/opengl/win/WinDeviceInfo.cxx index 8dfca479626b..383cce8d6b98 100644 --- a/vcl/opengl/win/WinDeviceInfo.cxx +++ b/vcl/opengl/win/WinDeviceInfo.cxx @@ -626,7 +626,6 @@ void WinOpenGLDeviceInfo::GetData() DWORD memberIndex = 0; devinfoData.cbSize = sizeof(devinfoData); - OUString aDriverKeyPre("System\\CurrentControlSet\\Control\\Class\\"); /* enumerate device information elements in the device information set */ while (SetupDiEnumDeviceInfo(devinfo, memberIndex++, &devinfoData)) { @@ -639,7 +638,7 @@ void WinOpenGLDeviceInfo::GetData() sizeof(value), nullptr)) { - OUString driverKey(aDriverKeyPre); + OUString driverKey("System\\CurrentControlSet\\Control\\Class\\"); driverKey += SAL_U(value); result = RegOpenKeyExW(HKEY_LOCAL_MACHINE, SAL_W(driverKey.getStr()), 0, KEY_QUERY_VALUE, &key); if (result == ERROR_SUCCESS) @@ -715,7 +714,6 @@ void WinOpenGLDeviceInfo::GetData() uint32_t adapterVendorID2; uint32_t adapterDeviceID2; - OUString aDriverKeyPre("System\\CurrentControlSet\\Control\\Class\\"); /* enumerate device information elements in the device information set */ while (SetupDiEnumDeviceInfo(devinfo, memberIndex++, &devinfoData)) { @@ -728,7 +726,7 @@ void WinOpenGLDeviceInfo::GetData() sizeof(value), nullptr)) { - OUString driverKey2(aDriverKeyPre); + OUString driverKey2("System\\CurrentControlSet\\Control\\Class\\"); driverKey2 += SAL_U(value); result = RegOpenKeyExW(HKEY_LOCAL_MACHINE, SAL_W(driverKey2.getStr()), 0, KEY_QUERY_VALUE, &key); if (result == ERROR_SUCCESS) diff --git a/vcl/qa/cppunit/blocklistparsertest.cxx b/vcl/qa/cppunit/blocklistparsertest.cxx index ddad53b94a27..228e4bad9377 100644 --- a/vcl/qa/cppunit/blocklistparsertest.cxx +++ b/vcl/qa/cppunit/blocklistparsertest.cxx @@ -118,11 +118,11 @@ void BlocklistParserTest::testEvaluate() OUString vendorIntel = WinOpenGLDeviceInfo::GetDeviceVendor(wgl::VendorIntel); OUString vendorMicrosoft = WinOpenGLDeviceInfo::GetDeviceVendor(wgl::VendorMicrosoft); - uint32_t osWindowsXP = 0x00050001; - uint32_t osWindowsVista = 0x00060000; - uint32_t osWindows7 = 0x00060001; - uint32_t osWindows8 = 0x00060002; - uint32_t osWindows10 = 0x000A0000; + uint32_t const osWindowsXP = 0x00050001; + uint32_t const osWindowsVista = 0x00060000; + uint32_t const osWindows7 = 0x00060001; + uint32_t const osWindows8 = 0x00060002; + uint32_t const osWindows10 = 0x000A0000; // Check OS CPPUNIT_ASSERT_EQUAL(true, WinOpenGLDeviceInfo::FindBlocklistedDeviceInList( diff --git a/vcl/win/app/salinfo.cxx b/vcl/win/app/salinfo.cxx index 06729eca4713..815582c8e2a5 100644 --- a/vcl/win/app/salinfo.cxx +++ b/vcl/win/app/salinfo.cxx @@ -166,14 +166,12 @@ tools::Rectangle WinSalSystem::GetDisplayScreenPosSizePixel( unsigned int nScree int WinSalSystem::ShowNativeMessageBox(const OUString& rTitle, const OUString& rMessage) { - int nFlags = MB_TASKMODAL | MB_SETFOREGROUND | MB_ICONWARNING | MB_DEFBUTTON1; - ImplHideSplash(); return MessageBoxW( nullptr, reinterpret_cast<LPCWSTR>(rMessage.getStr()), reinterpret_cast<LPCWSTR>(rTitle.getStr()), - nFlags); + MB_TASKMODAL | MB_SETFOREGROUND | MB_ICONWARNING | MB_DEFBUTTON1); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/win/app/saltimer.cxx b/vcl/win/app/saltimer.cxx index 8a21780e6d1e..de213deaee7b 100644 --- a/vcl/win/app/saltimer.cxx +++ b/vcl/win/app/saltimer.cxx @@ -150,7 +150,7 @@ void EmitTimerCallback() // try this a short time later again. if (pSVData->mpSalTimer && ImplSalYieldMutexTryToAcquire()) { - bool idle = true; // TODO + bool const idle = true; // TODO pSVData->mpSalTimer->CallCallback( idle ); ImplSalYieldMutexRelease(); diff --git a/vcl/win/gdi/salfont.cxx b/vcl/win/gdi/salfont.cxx index 942898364291..9757c9692add 100644 --- a/vcl/win/gdi/salfont.cxx +++ b/vcl/win/gdi/salfont.cxx @@ -1078,7 +1078,7 @@ bool ImplAddTempFont( SalData& rSalData, const OUString& rFontFileURL ) aFileName[2] = sal::static_int_cast<char>('A' + (15 & (nCounter>>4))); aFileName[3] = sal::static_int_cast<char>('A' + (15 & nCounter)); char aResourceName[512]; - int nMaxLen = sizeof(aResourceName)/sizeof(*aResourceName) - 16; + int const nMaxLen = sizeof(aResourceName)/sizeof(*aResourceName) - 16; int nLen = ::GetTempPathA( nMaxLen, aResourceName ); ::strncpy( aResourceName + nLen, aFileName, sizeof( aResourceName )- nLen ); // security: end buffer in any case diff --git a/vcl/win/gdi/salgdi.cxx b/vcl/win/gdi/salgdi.cxx index 4b60ad681d88..0a85a3059ea5 100644 --- a/vcl/win/gdi/salgdi.cxx +++ b/vcl/win/gdi/salgdi.cxx @@ -225,7 +225,7 @@ void ImplInitSalGDI() if( pSalData->mhDitherPal ) { // create DIBPattern for 8Bit dithering - long nSize = sizeof( BITMAPINFOHEADER ) + ( 256 * sizeof( short ) ) + 64; + long const nSize = sizeof( BITMAPINFOHEADER ) + ( 256 * sizeof( short ) ) + 64; long n; pSalData->mhDitherDIB = GlobalAlloc( GMEM_FIXED, nSize ); |