diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2019-11-19 15:15:50 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2019-11-19 21:34:30 +0100 |
commit | 5a11fe87a6f1507149a0965aa740dcdf4ccef3c3 (patch) | |
tree | 3f3e788a0e54c94e980bd61e4466d4d6e2c34415 /sfx2/source/appl/shutdowniconw32.cxx | |
parent | 77d301f5e40e4f0fb4a127b8b6361a0fb1b1dbd9 (diff) |
loplugin:fakebool (clang-cl)
...plus follow-up loplugin:implicitboolconversion and loplugin:redundantcast
Change-Id: I9fc9c5cb46fbb50da87ff80af64cb0dfda3e5f90
Reviewed-on: https://gerrit.libreoffice.org/83207
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sfx2/source/appl/shutdowniconw32.cxx')
-rw-r--r-- | sfx2/source/appl/shutdowniconw32.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sfx2/source/appl/shutdowniconw32.cxx b/sfx2/source/appl/shutdowniconw32.cxx index dec949151d5d..a5c81d5e1b0f 100644 --- a/sfx2/source/appl/shutdowniconw32.cxx +++ b/sfx2/source/appl/shutdowniconw32.cxx @@ -300,8 +300,8 @@ static LRESULT CALLBACK listenerWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LP { case WM_LBUTTONDOWN: { - BOOL const ret = PostMessageW(aExecuterWindow, WM_COMMAND, IDM_STARTCENTER, reinterpret_cast<LPARAM>(hWnd)); - SAL_WARN_IF(0 == ret, "sfx.appl", "ERROR: PostMessage() failed!"); + bool const ret = PostMessageW(aExecuterWindow, WM_COMMAND, IDM_STARTCENTER, reinterpret_cast<LPARAM>(hWnd)); + SAL_WARN_IF(!ret, "sfx.appl", "ERROR: PostMessage() failed!"); break; } @@ -319,8 +319,8 @@ static LRESULT CALLBACK listenerWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LP EnableMenuItem( popupMenu, IDM_TEMPLATE, MF_BYCOMMAND | (ShutdownIcon::bModalMode ? MF_GRAYED : MF_ENABLED) ); int m = TrackPopupMenuEx( popupMenu, TPM_RETURNCMD|TPM_LEFTALIGN|TPM_RIGHTBUTTON, pt.x, pt.y, hWnd, nullptr ); - BOOL const ret = PostMessageW( hWnd, 0, 0, 0 ); - SAL_WARN_IF(0 == ret, "sfx.appl", "ERROR: PostMessage() failed!"); + bool const ret = PostMessageW( hWnd, 0, 0, 0 ); + SAL_WARN_IF(!ret, "sfx.appl", "ERROR: PostMessage() failed!"); switch( m ) { case IDM_OPEN: @@ -345,8 +345,8 @@ static LRESULT CALLBACK listenerWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LP break; } - BOOL const ret2 = PostMessageW(aExecuterWindow, WM_COMMAND, m, reinterpret_cast<LPARAM>(hWnd)); - SAL_WARN_IF(0 == ret2, "sfx.appl", "ERROR: PostMessage() failed!"); + bool const ret2 = PostMessageW(aExecuterWindow, WM_COMMAND, m, reinterpret_cast<LPARAM>(hWnd)); + SAL_WARN_IF(!ret2, "sfx.appl", "ERROR: PostMessage() failed!"); } break; } @@ -371,8 +371,8 @@ static LRESULT CALLBACK listenerWndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LP nid.uID = ID_QUICKSTART; Shell_NotifyIconW(NIM_DELETE, &nid); - BOOL const ret = PostMessageW(aExecuterWindow, WM_COMMAND, IDM_EXIT, reinterpret_cast<LPARAM>(hWnd)); - SAL_WARN_IF(0 == ret, "sfx.appl", "ERROR: PostMessage() failed!"); + bool const ret = PostMessageW(aExecuterWindow, WM_COMMAND, IDM_EXIT, reinterpret_cast<LPARAM>(hWnd)); + SAL_WARN_IF(!ret, "sfx.appl", "ERROR: PostMessage() failed!"); } else return DefWindowProcW(hWnd, uMsg, wParam, lParam); @@ -578,8 +578,8 @@ void OnDrawItem(HWND /*hwnd*/, LPDRAWITEMSTRUCT lpdis) HFONT hfntOld; HBRUSH hbrOld; int x, y; - BOOL fSelected = lpdis->itemState & ODS_SELECTED; - BOOL fDisabled = lpdis->itemState & (ODS_DISABLED | ODS_GRAYED); + bool fSelected = lpdis->itemState & ODS_SELECTED; + bool fDisabled = lpdis->itemState & (ODS_DISABLED | ODS_GRAYED); // Set the appropriate foreground and background colors. @@ -720,7 +720,7 @@ static HRESULT WINAPI SHCoCreateInstance( LPVOID lpszReserved, REFCLSID clsid, L return hResult; } -static BOOL CreateShortcut( const OUString& rAbsObject, const OUString& rAbsObjectPath, +static bool CreateShortcut( const OUString& rAbsObject, const OUString& rAbsObjectPath, const OUString& rAbsShortcut, const OUString& rDescription, const OUString& rParameter ) { HRESULT hres; |