diff options
author | reduz <reduzio@gmail.com> | 2022-05-13 15:04:37 +0200 |
---|---|---|
committer | RĂ©mi Verschelde <rverschelde@gmail.com> | 2022-05-16 10:37:48 +0200 |
commit | 746dddc0673d7261f19b1e056e90e6e3a49ef33a (patch) | |
tree | 434b526eb286850ebccc6d2c998a7d90fdb8b5e2 /platform/iphone | |
parent | 396def9b66c476f7834604adb7136ca903ed01be (diff) |
Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
(order matters) but use is discouraged.
There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
Diffstat (limited to 'platform/iphone')
-rw-r--r-- | platform/iphone/export/export_plugin.cpp | 8 | ||||
-rw-r--r-- | platform/iphone/export/export_plugin.h | 2 | ||||
-rw-r--r-- | platform/iphone/tts_ios.h | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/platform/iphone/export/export_plugin.cpp b/platform/iphone/export/export_plugin.cpp index bf7cf6ee81..09191c958d 100644 --- a/platform/iphone/export/export_plugin.cpp +++ b/platform/iphone/export/export_plugin.cpp @@ -102,7 +102,7 @@ void EditorExportPlatformIOS::get_export_options(List<ExportOption> *r_options) r_options->push_back(ExportOption(PropertyInfo(Variant::BOOL, "plugins/" + found_plugins[i].name), false)); } - Set<String> plist_keys; + RBSet<String> plist_keys; for (int i = 0; i < found_plugins.size(); i++) { // Editable plugin plist values @@ -1178,7 +1178,7 @@ Error EditorExportPlatformIOS::_export_ios_plugins(const Ref<EditorExportPreset> Vector<String> added_embedded_dependenciy_names; HashMap<String, String> plist_values; - Set<String> plugin_linker_flags; + RBSet<String> plugin_linker_flags; Error err; @@ -1350,7 +1350,7 @@ Error EditorExportPlatformIOS::_export_ios_plugins(const Ref<EditorExportPreset> // Update Linker Flag Values { String result_linker_flags = " "; - for (Set<String>::Element *E = plugin_linker_flags.front(); E; E = E->next()) { + for (RBSet<String>::Element *E = plugin_linker_flags.front(); E; E = E->next()) { const String &flag = E->get(); if (flag.length() == 0) { @@ -1453,7 +1453,7 @@ Error EditorExportPlatformIOS::export_project(const Ref<EditorExportPreset> &p_p bool found_library = false; const String project_file = "godot_ios.xcodeproj/project.pbxproj"; - Set<String> files_to_parse; + RBSet<String> files_to_parse; files_to_parse.insert("godot_ios/godot_ios-Info.plist"); files_to_parse.insert(project_file); files_to_parse.insert("godot_ios/export_options.plist"); diff --git a/platform/iphone/export/export_plugin.h b/platform/iphone/export/export_plugin.h index 2c6faed691..10a17c4bf1 100644 --- a/platform/iphone/export/export_plugin.h +++ b/platform/iphone/export/export_plugin.h @@ -204,7 +204,7 @@ public: r_features->push_back("ios"); } - virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, Set<String> &p_features) override { + virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, RBSet<String> &p_features) override { } EditorExportPlatformIOS(); diff --git a/platform/iphone/tts_ios.h b/platform/iphone/tts_ios.h index 3fac762b62..064316b0b2 100644 --- a/platform/iphone/tts_ios.h +++ b/platform/iphone/tts_ios.h @@ -39,13 +39,13 @@ #include "core/string/ustring.h" #include "core/templates/list.h" -#include "core/templates/map.h" +#include "core/templates/rb_map.h" #include "core/variant/array.h" #include "servers/display_server.h" @interface TTS_IOS : NSObject <AVSpeechSynthesizerDelegate> { bool speaking; - Map<id, int> ids; + HashMap<id, int> ids; AVSpeechSynthesizer *av_synth; List<DisplayServer::TTSUtterance> queue; |