[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

@@ -94,7 +94,7 @@ namespace winrt::PowerToys::PowerAccentKeyboardService::implementation
{
std::vector<std::wstring> excludedApps;
auto excludedUppercase = std::wstring(excludedAppsView);
CharUpperBuffW(excludedUppercase.data(), (DWORD)excludedUppercase.length());
CharUpperBuffW(excludedUppercase.data(), static_cast<DWORD>(excludedUppercase.length()));
std::wstring_view view(excludedUppercase);
view = left_trim<wchar_t>(trim<wchar_t>(view));
@@ -129,7 +129,7 @@ namespace winrt::PowerToys::PowerAccentKeyboardService::implementation
return m_prevForegroundAppExcl.second;
}
auto processPath = get_process_path(foregroundApp);
CharUpperBuffW(processPath.data(), (DWORD)processPath.length());
CharUpperBuffW(processPath.data(), static_cast<DWORD>(processPath.length()));
m_prevForegroundAppExcl = { foregroundApp,
find_app_name_in_path(processPath, m_settings.excludedApps) };