1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-16 15:29:55 +00:00

Fix a gcc warning about copy

```
/home/jvoisin/dev/openmw/openmw/components/fontloader/fontloader.cpp:532:29: warning: loop variable '[key, value]' creates a copy from type 'std::pair<const int, int> const' [-Wrange-loop-construct]
            for (const auto [key, value] : additional)
                            ^
/home/jvoisin/dev/openmw/openmw/components/fontloader/fontloader.cpp:532:18: note: use reference type 'std::pair<const int, int> const &' to prevent copying
            for (const auto [key, value] : additional)
                 ^~~~~~~~~~~~~~~~~~~~~~~~~
                            &
1 warning generated.
```
This commit is contained in:
jvoisin 2023-05-22 17:18:43 +02:00
parent 45c84a2426
commit 6da3c3e200

View file

@ -529,7 +529,7 @@ namespace Gui
additional.insert(std::make_pair(84, 0x2122)); // trademark sign
additional.insert(std::make_pair(45, 0x2212)); // minus sign
for (const auto [key, value] : additional)
for (const auto& [key, value] : additional)
{
if (key != i)
continue;