diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-10-14 16:57:24 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-10-16 14:19:22 +0000 |
commit | 08abfef116d893d6a062d432ff89e7af8b7b679d (patch) | |
tree | dc6f12f1669b40651a42b7a0556e264bc607a42b /desktop/win32/source/applauncher/launcher.cxx | |
parent | 1f9b6013e507ee4acb9374cee909f59139d52978 (diff) |
clang-cl loplugin: desktop
Change-Id: If2f5bfa6c05098c5362cd6c7b546520dc01ee821
Reviewed-on: https://gerrit.libreoffice.org/29871
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'desktop/win32/source/applauncher/launcher.cxx')
-rw-r--r-- | desktop/win32/source/applauncher/launcher.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/desktop/win32/source/applauncher/launcher.cxx b/desktop/win32/source/applauncher/launcher.cxx index 2aac505e80b7..029d1a17b28c 100644 --- a/desktop/win32/source/applauncher/launcher.cxx +++ b/desktop/win32/source/applauncher/launcher.cxx @@ -43,7 +43,7 @@ extern "C" int APIENTRY _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int ) LPTSTR lpCommandLine = GetCommandLine(); { - lpCommandLine = (LPTSTR)_alloca( sizeof(_TCHAR) * (_tcslen(lpCommandLine) + _tcslen(APPLICATION_SWITCH) + 2) ); + lpCommandLine = static_cast<LPTSTR>(_alloca( sizeof(_TCHAR) * (_tcslen(lpCommandLine) + _tcslen(APPLICATION_SWITCH) + 2) )); _tcscpy( lpCommandLine, GetCommandLine() ); _tcscat( lpCommandLine, _T(" ") ); @@ -59,7 +59,7 @@ extern "C" int APIENTRY _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int ) TCHAR szFileName[MAX_PATH]; TCHAR szExt[MAX_PATH]; - GetModuleFileName( NULL, szApplicationName, MAX_PATH ); + GetModuleFileName( nullptr, szApplicationName, MAX_PATH ); _tsplitpath( szApplicationName, szDrive, szDir, szFileName, szExt ); _tmakepath( szApplicationName, szDrive, szDir, _T("soffice"), _T(".exe") ); @@ -69,12 +69,12 @@ extern "C" int APIENTRY _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int ) BOOL fSuccess = CreateProcess( szApplicationName, lpCommandLine, - NULL, - NULL, + nullptr, + nullptr, TRUE, 0, - NULL, - NULL, + nullptr, + nullptr, &aStartupInfo, &aProcessInfo ); @@ -98,16 +98,16 @@ extern "C" int APIENTRY _tWinMain( HINSTANCE, HINSTANCE, LPTSTR, int ) 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 ); |