diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2021-07-24 15:46:25 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2021-07-25 12:22:25 +0200 |
commit | ac3322b0af8f23e8e2dac8111200bc69b5604c9f (patch) | |
tree | 59a079f13b5c03c2dd3328a26c55f3618e6014f6 /core/input/input_map.cpp | |
parent | a0f7f42b842462646281f5c4c9a8db070e034adc (diff) | |
download | redot-engine-ac3322b0af8f23e8e2dac8111200bc69b5604c9f.tar.gz |
Use const references where possible for List range iterators
Diffstat (limited to 'core/input/input_map.cpp')
-rw-r--r-- | core/input/input_map.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/input/input_map.cpp b/core/input/input_map.cpp index 0c8705b263..6714705bb5 100644 --- a/core/input/input_map.cpp +++ b/core/input/input_map.cpp @@ -65,7 +65,7 @@ String InputMap::_suggest_actions(const StringName &p_action) const { float closest_similarity = 0.0; // Find the most action with the most similar name. - for (StringName &action : actions) { + for (const StringName &action : actions) { const float similarity = String(action).similarity(p_action); if (similarity > closest_similarity) { @@ -261,7 +261,7 @@ void InputMap::load_from_project_settings() { List<PropertyInfo> pinfo; ProjectSettings::get_singleton()->get_property_list(&pinfo); - for (PropertyInfo &pi : pinfo) { + for (const PropertyInfo &pi : pinfo) { if (!pi.name.begins_with("input/")) { continue; } |