[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:
sosssego
2023-02-08 13:10:28 +00:00
committed by GitHub
parent 17475ec705
commit c7f761a589
13 changed files with 29 additions and 23 deletions

View File

@@ -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