mirror of
https://github.com/microsoft/PowerToys.git
synced 2024-12-01 01:49:06 +08:00
FZ: use type aliases for Data types
This commit is contained in:
parent
9939779932
commit
3eff741da8
@ -11,6 +11,7 @@
|
||||
#include <optional>
|
||||
#include <vector>
|
||||
#include <winnt.h>
|
||||
#include <lib/JsonHelpers.h>
|
||||
|
||||
namespace FancyZonesDataTypes
|
||||
{
|
||||
@ -41,13 +42,13 @@ public:
|
||||
|
||||
std::optional<FancyZonesDataTypes::CustomZoneSetData> FindCustomZoneSet(const std::wstring& guid) const;
|
||||
|
||||
inline const std::unordered_map<std::wstring, FancyZonesDataTypes::DeviceInfoData>& GetDeviceInfoMap() const
|
||||
inline const JSONHelpers::TDeviceInfoMap & GetDeviceInfoMap() const
|
||||
{
|
||||
std::scoped_lock lock{ dataLock };
|
||||
return deviceInfoMap;
|
||||
}
|
||||
|
||||
inline const std::unordered_map<std::wstring, FancyZonesDataTypes::CustomZoneSetData>& GetCustomZoneSetsMap() const
|
||||
inline const JSONHelpers::TCustomZoneSetsMap & GetCustomZoneSetsMap() const
|
||||
{
|
||||
std::scoped_lock lock{ dataLock };
|
||||
return customZoneSetsMap;
|
||||
@ -127,9 +128,9 @@ private:
|
||||
// Maps app path to app's zone history data
|
||||
std::unordered_map<std::wstring, std::vector<FancyZonesDataTypes::AppZoneHistoryData>> appZoneHistoryMap{};
|
||||
// Maps device unique ID to device data
|
||||
std::unordered_map<std::wstring, FancyZonesDataTypes::DeviceInfoData> deviceInfoMap{};
|
||||
JSONHelpers::TDeviceInfoMap deviceInfoMap{};
|
||||
// Maps custom zoneset UUID to it's data
|
||||
std::unordered_map<std::wstring, FancyZonesDataTypes::CustomZoneSetData> customZoneSetsMap{};
|
||||
JSONHelpers::TCustomZoneSetsMap customZoneSetsMap{};
|
||||
|
||||
std::wstring zonesSettingsFileName;
|
||||
std::wstring appZoneHistoryFileName;
|
||||
|
@ -487,7 +487,7 @@ namespace JSONHelpers
|
||||
{
|
||||
try
|
||||
{
|
||||
std::unordered_map<std::wstring, FancyZonesDataTypes::DeviceInfoData> appliedZonesets;
|
||||
TDeviceInfoMap appliedZonesets;
|
||||
|
||||
auto zonesets = json.GetNamedArray(NonLocalizable::AppliedZonesets);
|
||||
for (const auto& zoneset : zonesets)
|
||||
|
Loading…
Reference in New Issue
Block a user