mirror of
https://github.com/microsoft/PowerToys
synced 2025-08-22 01:58:04 +00:00
[Analyzers][CPP]Turn on warning 4389 (#22082)
This commit is contained in:
parent
b2c8900bae
commit
c3ffd17e43
@ -42,7 +42,7 @@
|
|||||||
<ClCompile>
|
<ClCompile>
|
||||||
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
|
||||||
<WarningLevel>Level4</WarningLevel>
|
<WarningLevel>Level4</WarningLevel>
|
||||||
<DisableSpecificWarnings>26800;28251;4389;6387;4458;4505;4515;4459;4702;6031;6248;26451;28182;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
<DisableSpecificWarnings>26800;28251;6387;4458;4505;4515;4459;4702;6031;6248;26451;28182;%(DisableSpecificWarnings)</DisableSpecificWarnings>
|
||||||
<DisableAnalyzeExternal >true</DisableAnalyzeExternal>
|
<DisableAnalyzeExternal >true</DisableAnalyzeExternal>
|
||||||
<ExternalWarningLevel>TurnOffAllWarnings</ExternalWarningLevel>
|
<ExternalWarningLevel>TurnOffAllWarnings</ExternalWarningLevel>
|
||||||
<ConformanceMode>false</ConformanceMode>
|
<ConformanceMode>false</ConformanceMode>
|
||||||
|
@ -70,7 +70,7 @@ namespace JsonUtils
|
|||||||
json::JsonArray columnsPercentage = infoJson.GetNamedArray(NonLocalizable::CustomLayoutsIds::ColumnsPercentageID);
|
json::JsonArray columnsPercentage = infoJson.GetNamedArray(NonLocalizable::CustomLayoutsIds::ColumnsPercentageID);
|
||||||
json::JsonArray cellChildMap = infoJson.GetNamedArray(NonLocalizable::CustomLayoutsIds::CellChildMapID);
|
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;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
@ -80,7 +80,7 @@ namespace JsonUtils
|
|||||||
for (const auto& cellsRow : cellChildMap)
|
for (const auto& cellsRow : cellChildMap)
|
||||||
{
|
{
|
||||||
const auto cellsArray = cellsRow.GetArray();
|
const auto cellsArray = cellsRow.GetArray();
|
||||||
if (cellsArray.Size() != info.m_columns)
|
if (static_cast<int>(cellsArray.Size()) != info.m_columns)
|
||||||
{
|
{
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
@ -383,7 +383,7 @@ namespace JSONHelpers
|
|||||||
json::JsonArray columnsPercentage = infoJson.GetNamedArray(NonLocalizable::ColumnsPercentageStr);
|
json::JsonArray columnsPercentage = infoJson.GetNamedArray(NonLocalizable::ColumnsPercentageStr);
|
||||||
json::JsonArray cellChildMap = infoJson.GetNamedArray(NonLocalizable::CellChildMapStr);
|
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;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
@ -393,7 +393,7 @@ namespace JSONHelpers
|
|||||||
for (const auto& cellsRow : cellChildMap)
|
for (const auto& cellsRow : cellChildMap)
|
||||||
{
|
{
|
||||||
const auto cellsArray = cellsRow.GetArray();
|
const auto cellsArray = cellsRow.GetArray();
|
||||||
if (cellsArray.Size() != info.m_columns)
|
if (static_cast<int>(cellsArray.Size()) != info.m_columns)
|
||||||
{
|
{
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
|
@ -243,7 +243,7 @@ bool WorkArea::MoveWindowIntoZoneByDirectionAndIndex(HWND window, DWORD vkCode,
|
|||||||
ZoneIndex oldId = zoneIndexes[0];
|
ZoneIndex oldId = zoneIndexes[0];
|
||||||
|
|
||||||
// We reached the edge
|
// 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)
|
if (!cycle)
|
||||||
{
|
{
|
||||||
|
@ -783,7 +783,7 @@ bool Shortcut::IsKeyboardStateClearExceptShortcut(KeyboardManagerInput::InputInt
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// If any other key is pressed check if it is the action key
|
// 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;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user