Skip to content

Commit

Permalink
Remove unneded assignments (#1755)
Browse files Browse the repository at this point in the history
* Remove uneeded assignments

* Use const iterators
  • Loading branch information
stefansjfw authored Mar 27, 2020
1 parent 3e9e6c3 commit ead47b2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/modules/fancyzones/lib/JsonHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::wstring, ZoneSetData> zoneSetMap) {
auto it = std::find_if(appliedZoneSetsMap.cbegin(), appliedZoneSetsMap.cend(), [&uuid](std::pair<std::wstring, ZoneSetData> 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
{
Expand All @@ -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();
}
}

Expand Down

0 comments on commit ead47b2

Please sign in to comment.