diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-10-14 16:57:29 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-10-16 14:19:22 +0000 |
commit | 8b7198f68f956106827161d7b9abe07c47026f00 (patch) | |
tree | 7e58c15d4b0825a844951cc74eaeaa4a003312ac /dbaccess/win32 | |
parent | 08abfef116d893d6a062d432ff89e7af8b7b679d (diff) |
clang-cl loplugin: dbaccess
Change-Id: I96982e5298783384c2978056af7955d012289f25
Reviewed-on: https://gerrit.libreoffice.org/29872
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'dbaccess/win32')
-rw-r--r-- | dbaccess/win32/source/odbcconfig/odbcconfig.cxx | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/dbaccess/win32/source/odbcconfig/odbcconfig.cxx b/dbaccess/win32/source/odbcconfig/odbcconfig.cxx index ef82f546e097..4805d16053c6 100644 --- a/dbaccess/win32/source/odbcconfig/odbcconfig.cxx +++ b/dbaccess/win32/source/odbcconfig/odbcconfig.cxx @@ -50,16 +50,16 @@ int displayLastError() FormatMessage( FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM, - NULL, + nullptr, dwError, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), // Default language - (LPTSTR)&lpMsgBuf, + reinterpret_cast<LPTSTR>(&lpMsgBuf), 0, - NULL + nullptr ); // Display the string. - MessageBox( NULL, (LPCTSTR)lpMsgBuf, NULL, MB_OK | MB_ICONERROR ); + MessageBox( nullptr, static_cast<LPCTSTR>(lpMsgBuf), nullptr, MB_OK | MB_ICONERROR ); // Free the buffer. LocalFree( lpMsgBuf ); @@ -79,12 +79,12 @@ BOOL registerWindowClass( HINSTANCE _hAppInstance ) wcx.cbClsExtra = 0; // no extra class memory wcx.cbWndExtra = 0; // no extra window memory wcx.hInstance = _hAppInstance; // handle to instance - wcx.hIcon = NULL; // predefined app. icon - wcx.hCursor = NULL; // predefined arrow - wcx.hbrBackground = NULL; // no background brush - wcx.lpszMenuName = NULL; // name of menu resource + wcx.hIcon = nullptr; // predefined app. icon + wcx.hCursor = nullptr; // predefined arrow + wcx.hbrBackground = nullptr; // no background brush + wcx.lpszMenuName = nullptr; // name of menu resource wcx.lpszClassName = L"ODBCConfigMainClass"; // name of window class - wcx.hIconSm = NULL; // small class icon + wcx.hIconSm = nullptr; // small class icon return ( !!RegisterClassEx( &wcx ) ); } @@ -100,10 +100,10 @@ HWND initInstance( HINSTANCE _hAppInstance ) CW_USEDEFAULT, // default vertical position CW_USEDEFAULT, // default width CW_USEDEFAULT, // default height - (HWND) NULL, // no owner window - (HMENU) NULL, // use class menu + nullptr, // no owner window + nullptr, // use class menu _hAppInstance, // handle to application instance - (LPVOID) NULL); // no window-creation data + nullptr); // no window-creation data // don't show the window, we only need it as parent handle for the // SQLManageDataSources function @@ -125,16 +125,16 @@ extern "C" int APIENTRY _tWinMain( HINSTANCE _hAppInstance, HINSTANCE, LPTSTR, i return displayLastError(); HMODULE hModule = LoadLibraryW( ODBC_UI_LIB_NAME ); - if ( hModule == NULL ) - hModule = LoadLibraryExW( ODBC_UI_LIB_NAME, NULL, LOAD_WITH_ALTERED_SEARCH_PATH ); - if ( hModule == NULL ) + if ( hModule == nullptr ) + hModule = LoadLibraryExW( ODBC_UI_LIB_NAME, nullptr, LOAD_WITH_ALTERED_SEARCH_PATH ); + if ( hModule == nullptr ) return displayLastError(); FARPROC pManageDSProc = GetProcAddress( hModule, "SQLManageDataSources" ); - if ( pManageDSProc == NULL ) + if ( pManageDSProc == nullptr ) return displayLastError(); - TSQLManageDataSource pManageDS = (TSQLManageDataSource)pManageDSProc; + TSQLManageDataSource pManageDS = reinterpret_cast<TSQLManageDataSource>(pManageDSProc); if ( !( (*pManageDS)( hAppWindow ) ) ) return displayLastError(); |