mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-05 02:36:19 +02:00
[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:
@@ -2,6 +2,8 @@
|
||||
|
||||
#include "../utils/json.h"
|
||||
|
||||
#include <cwctype>
|
||||
|
||||
namespace PowerToysSettings
|
||||
{
|
||||
class HotkeyObject;
|
||||
@@ -230,7 +232,7 @@ namespace PowerToysSettings
|
||||
if (output_bytes == 1 && output[0] >= 'a' && output[0] <= 'z')
|
||||
{
|
||||
// Make Latin letters keys capital, as it looks better
|
||||
output[0] = toupper(output[0]);
|
||||
output[0] = std::towupper(output[0]);
|
||||
}
|
||||
return output.data();
|
||||
}
|
||||
|
||||
@@ -56,7 +56,7 @@ bool HotkeyManager::FilterKeyboardProc(KeyboardEvent ^ ev)
|
||||
pressedKeys->Ctrl = GetAsyncKeyState(VK_CONTROL) & 0x8000;
|
||||
pressedKeys->Alt = GetAsyncKeyState(VK_MENU) & 0x8000;
|
||||
pressedKeys->Shift = GetAsyncKeyState(VK_SHIFT) & 0x8000;
|
||||
pressedKeys->Key = ev->key;
|
||||
pressedKeys->Key = static_cast<unsigned char>(ev->key);
|
||||
|
||||
// Convert to hotkey handle
|
||||
auto pressedKeysHandle = GetHotkeyHandle(pressedKeys);
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace package {
|
||||
{
|
||||
OSVERSIONINFOEX osvi{};
|
||||
DWORDLONG dwlConditionMask = 0;
|
||||
int op = VER_GREATER_EQUAL;
|
||||
byte op = VER_GREATER_EQUAL;
|
||||
|
||||
// Initialize the OSVERSIONINFOEX structure.
|
||||
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFOEX);
|
||||
|
||||
Reference in New Issue
Block a user