diff --git a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp index 2bba4b41d..05d092e93 100644 --- a/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp +++ b/PowerEditor/src/ScintillaComponent/FindReplaceDlg.cpp @@ -3494,7 +3494,7 @@ void FindReplaceDlg::enableProjectCheckmarks() for (int i = 0; i < 3; i++) { UINT s = GetMenuState (hMenu, idm [i], MF_BYCOMMAND); - if (static_cast(s) != -1) + if (s != ((UINT)-1)) { if (s & MF_CHECKED) { diff --git a/PowerEditor/src/WinControls/ContextMenu/ContextMenu.cpp b/PowerEditor/src/WinControls/ContextMenu/ContextMenu.cpp index 5adb7cd59..32c06d426 100644 --- a/PowerEditor/src/WinControls/ContextMenu/ContextMenu.cpp +++ b/PowerEditor/src/WinControls/ContextMenu/ContextMenu.cpp @@ -104,7 +104,7 @@ void ContextMenu::create(HWND hParent, const std::vector & menuIte if (mainMenuHandle) { UINT s = ::GetMenuState(mainMenuHandle, item._cmdID, MF_BYCOMMAND); - if (static_cast(s) != -1) + if (s != ((UINT)-1)) { bool isEnabled = (s & (MF_DISABLED | MF_GRAYED)) == 0; bool isChecked = (s & (MF_CHECKED)) != 0; diff --git a/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.cpp b/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.cpp index c8c748742..9386e872d 100644 --- a/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.cpp +++ b/PowerEditor/src/WinControls/WindowsDlg/WindowsDlg.cpp @@ -897,9 +897,9 @@ void WindowsDlg::doClose() { // Trying to retain sort order. fairly sure there is a much better algorithm for this vector::iterator kitr = key.begin(); - for (UINT i=0; i(nmdlg.Items[i]) == -1) + if (nmdlg.Items[i] == ((UINT)-1)) { int oldVal = _idxMap[*kitr]; _idxMap[*kitr] = -1; @@ -1115,7 +1115,7 @@ void WindowsMenu::initPopupMenu(HMENU hMenu, DocTabView *pTab) mii.wID = id; UINT state = GetMenuState(hMenu, id, MF_BYCOMMAND); - if (static_cast(state) == -1) + if (state == ((UINT)-1)) InsertMenuItem(hMenu, IDM_WINDOW_WINDOWS, FALSE, &mii); else SetMenuItemInfo(hMenu, id, FALSE, &mii);