[SHELL32] AddStaticContextMenusToMenu(): Fix 3 MSVC 'warning C4805' (#6177)

- Use 'bool' type.
- Do not abuse '|=' operator.

Addendum to commit 7fb91d98f
This commit is contained in:
Serge Gautherie 2023-12-17 22:20:06 +01:00 committed by GitHub
parent e1c68dcba0
commit 0ba94c83b5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -540,7 +540,7 @@ CDefaultContextMenu::AddStaticContextMenusToMenu(
}
UINT cmdFlags = 0;
BOOL hide = FALSE;
bool hide = false;
HKEY hkVerb;
if (idResource > 0)
{
@ -585,12 +585,13 @@ CDefaultContextMenu::AddStaticContextMenusToMenu(
// FIXME: GetAsyncKeyState should not be called here, clients
// need to be updated to set the CMF_EXTENDEDVERBS flag.
if (!(uFlags & CMF_EXTENDEDVERBS) && GetAsyncKeyState(VK_SHIFT) >= 0)
hide |= RegValueExists(hkVerb, L"Extended");
hide = RegValueExists(hkVerb, L"Extended");
hide |= RegValueExists(hkVerb, L"ProgrammaticAccessOnly");
if (!hide)
hide = RegValueExists(hkVerb, L"ProgrammaticAccessOnly");
if (!(uFlags & CMF_DISABLEDVERBS))
hide |= RegValueExists(hkVerb, L"LegacyDisable");
if (!hide && !(uFlags & CMF_DISABLEDVERBS))
hide = RegValueExists(hkVerb, L"LegacyDisable");
if (RegValueExists(hkVerb, L"NeverDefault"))
fState &= ~MFS_DEFAULT;