Remove unneded assignments (#1755)

* Remove uneeded assignments

* Use const iterators
This commit is contained in:
stefansjfw
2020-03-27 23:12:41 +01:00
committed by GitHub
parent 3e9e6c3e73
commit ead47b2aa2

View File

@@ -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
{
@@ -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();
}
}