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:
parent
45c84a2426
commit
6da3c3e200
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue