From 1cf8634152980eb031941ada444992f156046178 Mon Sep 17 00:00:00 2001 From: stefansjfw <57057282+stefansjfw@users.noreply.github.com> Date: Sat, 7 Mar 2020 10:59:00 +0100 Subject: [PATCH] Move ZoneSetPersistedDataOLD to JsonHelpers (#1405) --- src/modules/fancyzones/lib/JsonHelpers.cpp | 13 +++++++++++++ src/modules/fancyzones/lib/ZoneSet.h | 13 ------------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/src/modules/fancyzones/lib/JsonHelpers.cpp b/src/modules/fancyzones/lib/JsonHelpers.cpp index c4deaadff6..a057ca1cd0 100644 --- a/src/modules/fancyzones/lib/JsonHelpers.cpp +++ b/src/modules/fancyzones/lib/JsonHelpers.cpp @@ -13,6 +13,19 @@ namespace { + // Needed for migration of applied zonesets from registry + struct ZoneSetPersistedDataOLD + { + static constexpr inline size_t MAX_ZONES = 40; + DWORD Version{ VERSION_PERSISTEDDATA }; + WORD LayoutId{}; + DWORD ZoneCount{}; + JSONHelpers::ZoneSetLayoutType Layout{}; + DWORD PaddingInner{}; + DWORD PaddingOuter{}; + RECT Zones[MAX_ZONES]{}; + }; + // From Settings.cs constexpr int c_focusModelId = 0xFFFF; constexpr int c_rowsModelId = 0xFFFE; diff --git a/src/modules/fancyzones/lib/ZoneSet.h b/src/modules/fancyzones/lib/ZoneSet.h index c500d4b11d..d9deddab9b 100644 --- a/src/modules/fancyzones/lib/ZoneSet.h +++ b/src/modules/fancyzones/lib/ZoneSet.h @@ -30,19 +30,6 @@ struct ZoneSetPersistedData RECT Zones[MAX_ZONES]{}; }; -struct ZoneSetPersistedDataOLD -{ - static constexpr inline size_t MAX_ZONES = 40; - DWORD Version{ VERSION_PERSISTEDDATA }; - WORD LayoutId{}; - DWORD ZoneCount{}; - JSONHelpers::ZoneSetLayoutType Layout{}; - DWORD PaddingInner{}; - DWORD PaddingOuter{}; - RECT Zones[MAX_ZONES]{}; -}; - - struct ZoneSetConfig { ZoneSetConfig(