../../../source/gui/CGUI.cpp:79:43: warning: loop variable 'p' has type 'const std::pair &' but is initialized with type 'std::pair' resulting in a copy [-Wrange-loop-construct] for (const std::pair& p : m_pAllObjects) ^ ../../../source/gui/CGUI.cpp:79:7: note: use non-reference type 'std::pair' to keep the copy or type 'const std::pair &' to prevent copying for (const std::pair& p : m_pAllObjects) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../source/gui/CGUI.cpp:82:49: warning: loop variable 'p' has type 'const std::pair &' but is initialized with type 'std::pair' resulting in a copy [-Wrange-loop-construct] for (const std::pair& p : m_Sprites) ^ ../../../source/gui/CGUI.cpp:82:7: note: use non-reference type 'std::pair' to keep the copy or type 'const std::pair &' to prevent copying for (const std::pair& p : m_Sprites) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../source/ps/Hotkey.cpp:60:47: warning: loop variable 'configPair' has type 'const std::pair &' (aka 'const pair > &') but is initialized with type 'std::pair > >' resulting in a copy [-Wrange-loop-construct] for (const std::pair& configPair : g_ConfigDB.GetValuesWithPrefix(CFG_COMMAND, "hotkey.")) ^ ../../../source/ps/Hotkey.cpp:60:7: note: use non-reference type 'std::pair' (aka 'pair >') to keep the copy or type 'const std::pair > > &' to prevent copying for (const std::pair& configPair : g_ConfigDB.GetValuesWithPrefix(CFG_COMMAND, "hotkey.")) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../source/ps/Hotkey.cpp:117:41: warning: loop variable 'p' has type 'const std::pair &' (aka 'const pair > &') but is initialized with type 'std::pair > >' resulting in a copy [-Wrange-loop-construct] for (const std::pair& p : g_HotkeyMap) ^ ../../../source/ps/Hotkey.cpp:117:7: note: use non-reference type 'std::pair' (aka 'pair >') to keep the copy or type 'const std::pair > > &' to prevent copying for (const std::pair& p : g_HotkeyMap) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../source/gui/ObjectBases/IGUIObject.cpp:74:44: warning: loop variable 'p' has type 'const std::pair &' but is initialized with type 'std::pair' resulting in a copy [-Wrange-loop-construct] for (const std::pair& p : m_Settings) ^ ../../../source/gui/ObjectBases/IGUIObject.cpp:74:7: note: use non-reference type 'std::pair' to keep the copy or type 'const std::pair &' to prevent copying for (const std::pair& p : m_Settings) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ../../../source/gui/ObjectBases/IGUIObject.cpp:277:37: warning: loop variable 'p' has type 'const std::pair &' but is initialized with type 'const std::pair' resulting in a copy [-Wrange-loop-construct] for (const std::pair& p : m_pGUI.GetStyle(StyleName).m_SettingsDefaults) ^ ../../../source/gui/ObjectBases/IGUIObject.cpp:277:7: note: use non-reference type 'std::pair' to keep the copy or type 'const std::pair &' to prevent copying for (const std::pair& p : m_pGUI.GetStyle(StyleName).m_SettingsDefaults) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Index: source/gui/CGUI.cpp =================================================================== --- source/gui/CGUI.cpp (revision 23702) +++ source/gui/CGUI.cpp (working copy) @@ -76,10 +76,10 @@ CGUI::~CGUI() { - for (const std::pair& p : m_pAllObjects) + for (const std::pair& p : m_pAllObjects) delete p.second; - for (const std::pair& p : m_Sprites) + for (const std::pair& p : m_Sprites) delete p.second; } Index: source/gui/ObjectBases/IGUIObject.cpp =================================================================== --- source/gui/ObjectBases/IGUIObject.cpp (revision 23702) +++ source/gui/ObjectBases/IGUIObject.cpp (working copy) @@ -71,7 +71,7 @@ IGUIObject::~IGUIObject() { - for (const std::pair& p : m_Settings) + for (const std::pair& p : m_Settings) delete p.second; if (!m_ScriptHandlers.empty()) @@ -274,7 +274,7 @@ // Other styles are reported if they specify a Setting that does not exist, // so that the XML author is informed and can correct the style. - for (const std::pair& p : m_pGUI.GetStyle(StyleName).m_SettingsDefaults) + for (const std::pair& p : m_pGUI.GetStyle(StyleName).m_SettingsDefaults) { if (SettingExists(p.first)) SetSettingFromString(p.first, p.second, true); Index: source/ps/Hotkey.cpp =================================================================== --- source/ps/Hotkey.cpp (revision 23702) +++ source/ps/Hotkey.cpp (working copy) @@ -57,7 +57,7 @@ // all key combinations that trigger it. static void LoadConfigBindings() { - for (const std::pair& configPair : g_ConfigDB.GetValuesWithPrefix(CFG_COMMAND, "hotkey.")) + for (const std::pair& configPair : g_ConfigDB.GetValuesWithPrefix(CFG_COMMAND, "hotkey.")) { std::string hotkeyName = configPair.first.substr(7); // strip the "hotkey." prefix for (const CStr& hotkey : configPair.second) @@ -114,7 +114,7 @@ // Set up the state of the hotkeys given no key is down. // i.e. find those hotkeys triggered by all negations. - for (const std::pair& p : g_HotkeyMap) + for (const std::pair& p : g_HotkeyMap) for (const SHotkeyMapping& hotkey : p.second) { if (!hotkey.negated)