mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 17:56:44 +02:00
[Analyzers][CPP]Turn on warning 4389 (#22082)
This commit is contained in:
@@ -70,7 +70,7 @@ namespace JsonUtils
|
||||
json::JsonArray columnsPercentage = infoJson.GetNamedArray(NonLocalizable::CustomLayoutsIds::ColumnsPercentageID);
|
||||
json::JsonArray cellChildMap = infoJson.GetNamedArray(NonLocalizable::CustomLayoutsIds::CellChildMapID);
|
||||
|
||||
if (rowsPercentage.Size() != info.m_rows || columnsPercentage.Size() != info.m_columns || cellChildMap.Size() != info.m_rows)
|
||||
if (static_cast<int>(rowsPercentage.Size()) != info.m_rows || static_cast<int>(columnsPercentage.Size()) != info.m_columns || static_cast<int>(cellChildMap.Size()) != info.m_rows)
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
@@ -80,7 +80,7 @@ namespace JsonUtils
|
||||
for (const auto& cellsRow : cellChildMap)
|
||||
{
|
||||
const auto cellsArray = cellsRow.GetArray();
|
||||
if (cellsArray.Size() != info.m_columns)
|
||||
if (static_cast<int>(cellsArray.Size()) != info.m_columns)
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
@@ -383,7 +383,7 @@ namespace JSONHelpers
|
||||
json::JsonArray columnsPercentage = infoJson.GetNamedArray(NonLocalizable::ColumnsPercentageStr);
|
||||
json::JsonArray cellChildMap = infoJson.GetNamedArray(NonLocalizable::CellChildMapStr);
|
||||
|
||||
if (rowsPercentage.Size() != info.m_rows || columnsPercentage.Size() != info.m_columns || cellChildMap.Size() != info.m_rows)
|
||||
if (static_cast<int>(rowsPercentage.Size()) != info.m_rows || static_cast<int>(columnsPercentage.Size()) != info.m_columns || static_cast<int>(cellChildMap.Size()) != info.m_rows)
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
@@ -393,7 +393,7 @@ namespace JSONHelpers
|
||||
for (const auto& cellsRow : cellChildMap)
|
||||
{
|
||||
const auto cellsArray = cellsRow.GetArray();
|
||||
if (cellsArray.Size() != info.m_columns)
|
||||
if (static_cast<int>(cellsArray.Size()) != info.m_columns)
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
@@ -243,7 +243,7 @@ bool WorkArea::MoveWindowIntoZoneByDirectionAndIndex(HWND window, DWORD vkCode,
|
||||
ZoneIndex oldId = zoneIndexes[0];
|
||||
|
||||
// We reached the edge
|
||||
if ((vkCode == VK_LEFT && oldId == 0) || (vkCode == VK_RIGHT && oldId == numZones - 1))
|
||||
if ((vkCode == VK_LEFT && oldId == 0) || (vkCode == VK_RIGHT && oldId == static_cast<int64_t>(numZones) - 1))
|
||||
{
|
||||
if (!cycle)
|
||||
{
|
||||
|
||||
@@ -783,7 +783,7 @@ bool Shortcut::IsKeyboardStateClearExceptShortcut(KeyboardManagerInput::InputInt
|
||||
}
|
||||
}
|
||||
// If any other key is pressed check if it is the action key
|
||||
else if (keyVal != actionKey)
|
||||
else if (keyVal != static_cast<int>(actionKey))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user