[CPP][Analyzers]Turn on warning 4244 (#22019)

* Turn on warning 4244

fix one occurrence of 4100

* changes from comments

* toupper on wchar
This commit is contained in:
sosssego
2022-11-17 16:24:56 +00:00
committed by GitHub
parent 8fb93dc6ee
commit 195c265a36
9 changed files with 11 additions and 10 deletions

View File

@@ -619,7 +619,7 @@ void D2DOverlayWindow::render(ID2D1DeviceContext5* d2d_dc)
d2d_dc->Clear();
int x_offset = 0, y_offset = 0;
auto current_anim_value = (float)animation.value(Animation::AnimFunctions::LINEAR);
SetLayeredWindowAttributes(hwnd, 0, (int)(255 * current_anim_value), LWA_ALPHA);
SetLayeredWindowAttributes(hwnd, 0, static_cast<byte>(255 * current_anim_value), LWA_ALPHA);
double pos_anim_value = 1 - animation.value(Animation::AnimFunctions::EASE_OUT_EXPO);
if (!tasklist_buttons.empty())
{

View File

@@ -311,7 +311,7 @@ private:
m_hotkey.modifiersMask |= MOD_ALT;
}
m_hotkey.vkCode = hotkey.get_code();
m_hotkey.vkCode = static_cast<WORD>(hotkey.get_code());
}
catch (...)
{

View File

@@ -212,7 +212,6 @@ void Trace::FancyZones::DataChanged() noexcept
activeZoneSetInfo += L", custom zone data was deleted";
}
}
TraceLoggingWrite(
g_hProvider,
EventZoneSettingsChangedKey,
@@ -220,7 +219,7 @@ void Trace::FancyZones::DataChanged() noexcept
TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE),
TraceLoggingInt32(appsHistorySize, AppsInHistoryCountKey),
TraceLoggingInt32(static_cast<int>(customZones.size()), CustomZoneSetCountKey),
TraceLoggingInt32Array(customZonesArray.get(), static_cast<int>(customZones.size()), NumberOfZonesForEachCustomZoneSetKey),
TraceLoggingInt32Array(customZonesArray.get(), static_cast<uint16_t>(customZones.size()), NumberOfZonesForEachCustomZoneSetKey),
TraceLoggingInt32(static_cast<int>(layouts.size()), ActiveZoneSetsCountKey),
TraceLoggingWideString(activeZoneSetInfo.c_str(), ActiveZoneSetsListKey),
TraceLoggingInt32(static_cast<int>(quickKeysCount), LayoutUsingQuickKeyCountKey));

View File

@@ -262,7 +262,7 @@ HRESULT CContextMenuHandler::ResizePictures(CMINVOKECOMMANDINFO* pici, IShellIte
startupInfo.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES;
if (pici)
{
startupInfo.wShowWindow = pici->nShow;
startupInfo.wShowWindow = static_cast<WORD>(pici->nShow);
}
else
{

View File

@@ -165,7 +165,7 @@ HRESULT CPowerRenameMenu::RunPowerRename(CMINVOKECOMMANDINFO* pici, IShellItemAr
startupInfo.dwFlags = STARTF_USESHOWWINDOW | STARTF_USESTDHANDLES;
if (pici)
{
startupInfo.wShowWindow = pici->nShow;
startupInfo.wShowWindow = static_cast<WORD>(pici->nShow);
}
else
{