mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-14 00:09:24 +01:00
![Lioncash](/assets/img/avatar_default.png)
Previously, every entry pair within the map would be copied. The reason for this is subtle. A std::map's internal entry type is defined as: std::pair<const Key, Value> but the loop was declaring it as: std::pair<Key, Value> These two types aren't synonymous with one another and so the compiler is required to always perform a copy. Using structured bindings avoids this (as would plain auto or correcting the explicit type), while also allowing the use of more appropriate names compared to first and second.