[Analyzers][CPP]Turn on warning 26475 (#22824)

This commit is contained in:
sosssego
2022-12-18 16:00:55 +00:00
committed by GitHub
parent 5fd7e2f7e6
commit 6244604d03
4 changed files with 10 additions and 10 deletions

View File

@@ -660,19 +660,19 @@ namespace UnitTestsCommonLib
TEST_METHOD (GetCodeFromJson)
{
HotkeyObject object = HotkeyObject::from_json(m_defaultHotkeyJson);
Assert::AreEqual(UINT(123), object.get_code());
Assert::AreEqual(123U, object.get_code());
}
TEST_METHOD (GetCodeFromJsonString)
{
HotkeyObject object = HotkeyObject::from_json_string(m_defaultHotkeyJson.Stringify());
Assert::AreEqual(UINT(123), object.get_code());
Assert::AreEqual(123U, object.get_code());
}
TEST_METHOD (GetCodeFromSettings)
{
HotkeyObject object = HotkeyObject::from_settings(true, true, true, true, 123);
Assert::AreEqual(UINT(123), object.get_code());
Assert::AreEqual(123U, object.get_code());
}
TEST_METHOD (GetWinPressedFromJson)

View File

@@ -69,7 +69,7 @@ namespace ZoneSelectionAlgorithms
zoneIndex = (static_cast<ZoneIndex>(pt.x) - overlap.left) * capturedZones.size() / width;
}
zoneIndex = std::clamp(zoneIndex, ZoneIndex(0), static_cast<ZoneIndex>(capturedZones.size()) - 1);
zoneIndex = std::clamp(zoneIndex, static_cast<ZoneIndex>(0), static_cast<ZoneIndex>(capturedZones.size()) - 1);
return { capturedZones[zoneIndex] };
}