mirror of
https://github.com/godotengine/godot.git
synced 2025-11-01 06:01:14 +00:00
Use const references where possible for List range iterators
This commit is contained in:
parent
a0f7f42b84
commit
ac3322b0af
171 changed files with 649 additions and 650 deletions
|
|
@ -229,7 +229,7 @@ void ProjectSettingsEditor::_add_feature_overrides() {
|
|||
for (int i = 0; i < ee->get_export_platform_count(); i++) {
|
||||
List<String> p;
|
||||
ee->get_export_platform(i)->get_platform_features(&p);
|
||||
for (String &E : p) {
|
||||
for (const String &E : p) {
|
||||
presets.insert(E);
|
||||
}
|
||||
}
|
||||
|
|
@ -237,7 +237,7 @@ void ProjectSettingsEditor::_add_feature_overrides() {
|
|||
for (int i = 0; i < ee->get_export_preset_count(); i++) {
|
||||
List<String> p;
|
||||
ee->get_export_preset(i)->get_platform()->get_preset_features(ee->get_export_preset(i), &p);
|
||||
for (String &E : p) {
|
||||
for (const String &E : p) {
|
||||
presets.insert(E);
|
||||
}
|
||||
|
||||
|
|
@ -391,7 +391,7 @@ void ProjectSettingsEditor::_action_reordered(const String &p_action_name, const
|
|||
|
||||
undo_redo->create_action(TTR("Update Input Action Order"));
|
||||
|
||||
for (PropertyInfo &prop : props) {
|
||||
for (const PropertyInfo &prop : props) {
|
||||
// Skip builtins and non-inputs
|
||||
if (ProjectSettings::get_singleton()->is_builtin_setting(prop.name) || !prop.name.begins_with("input/")) {
|
||||
continue;
|
||||
|
|
@ -444,7 +444,7 @@ void ProjectSettingsEditor::_update_action_map_editor() {
|
|||
ProjectSettings::get_singleton()->get_property_list(&props);
|
||||
|
||||
const Ref<Texture2D> builtin_icon = get_theme_icon(SNAME("PinPressed"), SNAME("EditorIcons"));
|
||||
for (PropertyInfo &E : props) {
|
||||
for (const PropertyInfo &E : props) {
|
||||
const String property_name = E.name;
|
||||
|
||||
if (!property_name.begins_with("input/")) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue