mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
[Analyzers][CPP]Changes to fix warning 26493 on src/modules/ (P) (#23604)
* Changes to fix warning 26493 on src/modules/
This commit is contained in:
@@ -123,12 +123,12 @@ void MRUListHandler::ParseJson()
|
||||
unsigned int oldSize{ size };
|
||||
if (json::has(jsonObject, c_maxMRUSize, json::JsonValueType::Number))
|
||||
{
|
||||
oldSize = (unsigned int)jsonObject.GetNamedNumber(c_maxMRUSize);
|
||||
oldSize = static_cast<unsigned int>(jsonObject.GetNamedNumber(c_maxMRUSize));
|
||||
}
|
||||
unsigned int oldPushIdx{ 0 };
|
||||
if (json::has(jsonObject, c_insertionIdx, json::JsonValueType::Number))
|
||||
{
|
||||
oldPushIdx = (unsigned int)jsonObject.GetNamedNumber(c_insertionIdx);
|
||||
oldPushIdx = static_cast<unsigned int>(jsonObject.GetNamedNumber(c_insertionIdx));
|
||||
if (oldPushIdx < 0 || oldPushIdx >= oldSize)
|
||||
{
|
||||
oldPushIdx = 0;
|
||||
@@ -156,7 +156,7 @@ void MRUListHandler::ParseJson()
|
||||
if (size > oldSize)
|
||||
{
|
||||
std::reverse(std::begin(temp), std::end(temp));
|
||||
pushIdx = (unsigned int)temp.size();
|
||||
pushIdx = static_cast<unsigned int>(temp.size());
|
||||
temp.resize(size);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user