mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 11:46:30 +02:00
[Analyzers][CPP]Turn on C26495 and fix code (#21163)
C26495: A member variable isn't initialized by a constructor or by an initializer. Fixing occurrences with default member initialization.
This commit is contained in:
@@ -13,9 +13,9 @@ namespace BackwardsCompatibility
|
||||
struct DeviceIdData
|
||||
{
|
||||
std::wstring deviceName = L"FallbackDevice";
|
||||
int width;
|
||||
int height;
|
||||
GUID virtualDesktopId;
|
||||
int width{};
|
||||
int height{};
|
||||
GUID virtualDesktopId{};
|
||||
std::wstring monitorId;
|
||||
|
||||
static std::optional<DeviceIdData> ParseDeviceId(const std::wstring& str);
|
||||
@@ -77,7 +77,7 @@ namespace JSONHelpers
|
||||
struct LayoutQuickKeyJSON
|
||||
{
|
||||
std::wstring layoutUuid;
|
||||
int key;
|
||||
int key{};
|
||||
|
||||
static std::optional<LayoutQuickKeyJSON> FromJson(const json::JsonObject& device);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user