[Analyzers][CPP]Changes to fix warning 26493 on src/modules/ (S to V) (#23625)

Modules starting with S to V
This commit is contained in:
sosssego
2023-02-08 11:15:16 +00:00
committed by GitHub
parent b13f74c089
commit 49b2823056
10 changed files with 88 additions and 72 deletions

View File

@@ -332,11 +332,27 @@ private:
{
// Parse Legacy windows key press behavior settings
auto jsonUseLegacyWinKeyBehaviorObject = settingsObject.GetNamedObject(L"properties").GetNamedObject(L"use_legacy_press_win_key_behavior");
m_shouldReactToPressedWinKey = (bool)jsonUseLegacyWinKeyBehaviorObject.GetNamedBoolean(L"value");
m_shouldReactToPressedWinKey = jsonUseLegacyWinKeyBehaviorObject.GetNamedBoolean(L"value");
auto jsonPressTimeForGlobalWindowsShortcutsObject = settingsObject.GetNamedObject(L"properties").GetNamedObject(L"press_time");
auto jsonPressTimeForTaskbarIconShortcutsObject = settingsObject.GetNamedObject(L"properties").GetNamedObject(L"press_time_for_taskbar_icon_shortcuts");
m_millisecondsWinKeyPressTimeForGlobalWindowsShortcuts = (UINT)jsonPressTimeForGlobalWindowsShortcutsObject.GetNamedNumber(L"value");
m_millisecondsWinKeyPressTimeForTaskbarIconShortcuts = (UINT)jsonPressTimeForTaskbarIconShortcutsObject.GetNamedNumber(L"value");
int value = static_cast<int>(jsonPressTimeForGlobalWindowsShortcutsObject.GetNamedNumber(L"value"));
if (value >= 0)
{
m_millisecondsWinKeyPressTimeForGlobalWindowsShortcuts = value;
}
else
{
throw;
}
value = static_cast<int>(jsonPressTimeForTaskbarIconShortcutsObject.GetNamedNumber(L"value"));
if (value >= 0)
{
m_millisecondsWinKeyPressTimeForTaskbarIconShortcuts = value;
}
else
{
throw;
}
}
catch (...)
{