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 /modules/mono/class_db_api_json.cpp | |
| parent | a0f7f42b842462646281f5c4c9a8db070e034adc (diff) | |
| download | redot-engine-ac3322b0af8f23e8e2dac8111200bc69b5604c9f.tar.gz | |
Use const references where possible for List range iterators
Diffstat (limited to 'modules/mono/class_db_api_json.cpp')
| -rw-r--r-- | modules/mono/class_db_api_json.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/modules/mono/class_db_api_json.cpp b/modules/mono/class_db_api_json.cpp index 01d0e13515..0da06131af 100644 --- a/modules/mono/class_db_api_json.cpp +++ b/modules/mono/class_db_api_json.cpp @@ -50,7 +50,7 @@ void class_db_api_to_json(const String &p_output_file, ClassDB::APIType p_api) { //must be alphabetically sorted for hash to compute names.sort_custom<StringName::AlphCompare>(); - for (StringName &E : names) { + for (const StringName &E : names) { ClassDB::ClassInfo *t = ClassDB::classes.getptr(E); ERR_FAIL_COND(!t); if (t->api != p_api || !t->exposed) { @@ -84,7 +84,7 @@ void class_db_api_to_json(const String &p_output_file, ClassDB::APIType p_api) { Array methods; - for (StringName &F : snames) { + for (const StringName &F : snames) { Dictionary method_dict; methods.push_back(method_dict); @@ -141,7 +141,7 @@ void class_db_api_to_json(const String &p_output_file, ClassDB::APIType p_api) { Array constants; - for (StringName &F : snames) { + for (const StringName &F : snames) { Dictionary constant_dict; constants.push_back(constant_dict); @@ -168,7 +168,7 @@ void class_db_api_to_json(const String &p_output_file, ClassDB::APIType p_api) { Array signals; - for (StringName &F : snames) { + for (const StringName &F : snames) { Dictionary signal_dict; signals.push_back(signal_dict); @@ -203,7 +203,7 @@ void class_db_api_to_json(const String &p_output_file, ClassDB::APIType p_api) { Array properties; - for (StringName &F : snames) { + for (const StringName &F : snames) { Dictionary property_dict; properties.push_back(property_dict); @@ -222,7 +222,7 @@ void class_db_api_to_json(const String &p_output_file, ClassDB::APIType p_api) { Array property_list; //property list - for (PropertyInfo &F : t->property_list) { + for (const PropertyInfo &F : t->property_list) { Dictionary property_dict; property_list.push_back(property_dict); |
