mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-02-23 19:49:43 +01:00
Remove unneded assignments (#1755)
* Remove uneeded assignments * Use const iterators
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user