diff --git a/src/modules/fancyzones/lib/JsonHelpers.cpp b/src/modules/fancyzones/lib/JsonHelpers.cpp index 6aeb50c29756..c6194365e1ba 100644 --- a/src/modules/fancyzones/lib/JsonHelpers.cpp +++ b/src/modules/fancyzones/lib/JsonHelpers.cpp @@ -685,13 +685,13 @@ namespace JSONHelpers // int version = data[0] * 256 + data[1]; - Not used anymore std::wstring uuid = std::to_wstring(data[3] * 256 + data[4]); - auto it = std::find_if(appliedZoneSetsMap.begin(), appliedZoneSetsMap.end(), [&uuid](std::pair zoneSetMap) { + auto it = std::find_if(appliedZoneSetsMap.cbegin(), appliedZoneSetsMap.cend(), [&uuid](std::pair zoneSetMap) { return zoneSetMap.second.uuid.compare(uuid) == 0; }); - if (it != appliedZoneSetsMap.end()) + if (it != appliedZoneSetsMap.cend()) { - it->second.uuid = uuid = it->first; + uuid = it->first; } else { @@ -704,7 +704,7 @@ namespace JSONHelpers wil::unique_cotaskmem_string guidString; if (SUCCEEDED_LOG(StringFromCLSID(guid, &guidString))) { - it->second.uuid = uuid = guidString.get(); + uuid = guidString.get(); } }