summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/animation_bezier_editor.cpp20
-rw-r--r--editor/animation_bezier_editor.h5
-rw-r--r--editor/animation_track_editor.cpp2
-rw-r--r--editor/create_dialog.h2
-rw-r--r--editor/debugger/editor_debugger_inspector.cpp2
-rw-r--r--editor/debugger/editor_debugger_inspector.h2
-rw-r--r--editor/debugger/editor_debugger_node.h2
-rw-r--r--editor/debugger/editor_debugger_tree.h2
-rw-r--r--editor/debugger/editor_performance_profiler.cpp2
-rw-r--r--editor/debugger/editor_profiler.cpp2
-rw-r--r--editor/debugger/editor_profiler.h2
-rw-r--r--editor/doc_tools.cpp2
-rw-r--r--editor/editor_asset_installer.cpp2
-rw-r--r--editor/editor_data.cpp4
-rw-r--r--editor/editor_data.h2
-rw-r--r--editor/editor_dir_dialog.h2
-rw-r--r--editor/editor_export.cpp22
-rw-r--r--editor/editor_export.h22
-rw-r--r--editor/editor_feature_profile.cpp4
-rw-r--r--editor/editor_feature_profile.h8
-rw-r--r--editor/editor_file_system.cpp10
-rw-r--r--editor/editor_file_system.h16
-rw-r--r--editor/editor_folding.cpp12
-rw-r--r--editor/editor_folding.h6
-rw-r--r--editor/editor_help.cpp2
-rw-r--r--editor/editor_inspector.cpp8
-rw-r--r--editor/editor_inspector.h4
-rw-r--r--editor/editor_node.cpp8
-rw-r--r--editor/editor_node.h10
-rw-r--r--editor/editor_resource_picker.cpp25
-rw-r--r--editor/editor_resource_picker.h4
-rw-r--r--editor/editor_settings.h3
-rw-r--r--editor/editor_themes.cpp4
-rw-r--r--editor/editor_translation_parser.cpp4
-rw-r--r--editor/export_template_manager.cpp3
-rw-r--r--editor/fileserver/editor_file_server.cpp2
-rw-r--r--editor/fileserver/editor_file_server.h2
-rw-r--r--editor/filesystem_dock.cpp2
-rw-r--r--editor/filesystem_dock.h2
-rw-r--r--editor/find_in_files.cpp6
-rw-r--r--editor/find_in_files.h6
-rw-r--r--editor/import/collada.cpp10
-rw-r--r--editor/import/collada.h2
-rw-r--r--editor/import/dynamic_font_import_settings.h1
-rw-r--r--editor/import/editor_import_collada.cpp12
-rw-r--r--editor/import/resource_importer_scene.cpp4
-rw-r--r--editor/import/resource_importer_scene.h2
-rw-r--r--editor/import/scene_import_settings.h4
-rw-r--r--editor/import_dock.cpp4
-rw-r--r--editor/inspector_dock.cpp2
-rw-r--r--editor/plugins/animation_blend_tree_editor_plugin.cpp13
-rw-r--r--editor/plugins/animation_state_machine_editor.cpp8
-rw-r--r--editor/plugins/animation_state_machine_editor.h4
-rw-r--r--editor/plugins/editor_preview_plugins.cpp4
-rw-r--r--editor/plugins/gdextension_export_plugin.h4
-rw-r--r--editor/plugins/mesh_instance_3d_editor_plugin.cpp15
-rw-r--r--editor/plugins/node_3d_editor_gizmos.cpp2
-rw-r--r--editor/plugins/node_3d_editor_plugin.cpp43
-rw-r--r--editor/plugins/packed_scene_translation_parser_plugin.h2
-rw-r--r--editor/plugins/root_motion_editor_plugin.cpp2
-rw-r--r--editor/plugins/script_editor_plugin.cpp8
-rw-r--r--editor/plugins/script_editor_plugin.h4
-rw-r--r--editor/plugins/script_text_editor.cpp6
-rw-r--r--editor/plugins/script_text_editor.h2
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.h4
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp16
-rw-r--r--editor/plugins/visual_shader_editor_plugin.h6
-rw-r--r--editor/pot_generator.cpp2
-rw-r--r--editor/pot_generator.h4
-rw-r--r--editor/project_export.cpp9
-rw-r--r--editor/project_manager.cpp22
-rw-r--r--editor/project_settings_editor.cpp2
-rw-r--r--editor/property_editor.cpp4
-rw-r--r--editor/reparent_dialog.cpp2
-rw-r--r--editor/reparent_dialog.h2
-rw-r--r--editor/scene_tree_dock.cpp18
-rw-r--r--editor/scene_tree_dock.h2
-rw-r--r--editor/scene_tree_editor.cpp4
-rw-r--r--editor/scene_tree_editor.h4
-rw-r--r--editor/shader_create_dialog.cpp2
80 files changed, 261 insertions, 250 deletions
diff --git a/editor/animation_bezier_editor.cpp b/editor/animation_bezier_editor.cpp
index c5f800b17a..f0650ee446 100644
--- a/editor/animation_bezier_editor.cpp
+++ b/editor/animation_bezier_editor.cpp
@@ -792,8 +792,8 @@ void AnimationBezierTrackEdit::_clear_selection() {
void AnimationBezierTrackEdit::_change_selected_keys_handle_mode(Animation::HandleMode p_mode) {
undo_redo->create_action(TTR("Update Selected Key Handles"));
double ratio = timeline->get_zoom_scale() * v_zoom;
- for (SelectionSet::Element *E = selection.back(); E; E = E->prev()) {
- const IntPair track_key_pair = E->get();
+ for (const IntPair &E : selection) {
+ const IntPair track_key_pair = E;
undo_redo->add_undo_method(animation.ptr(), "bezier_track_set_key_handle_mode", track_key_pair.first, track_key_pair.second, animation->bezier_track_get_key_handle_mode(track_key_pair.first, track_key_pair.second), ratio);
undo_redo->add_do_method(animation.ptr(), "bezier_track_set_key_handle_mode", track_key_pair.first, track_key_pair.second, p_mode, ratio);
}
@@ -851,14 +851,14 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
focused_keys.insert(key_pair);
}
} else {
- for (SelectionSet::Element *E = selection.front(); E; E = E->next()) {
- focused_keys.insert(E->get());
- if (E->get().second > 0) {
- IntPair previous_key = IntPair(E->get().first, E->get().second - 1);
+ for (const IntPair &E : selection) {
+ focused_keys.insert(E);
+ if (E.second > 0) {
+ IntPair previous_key = IntPair(E.first, E.second - 1);
focused_keys.insert(previous_key);
}
- if (E->get().second < animation->track_get_key_count(E->get().first) - 1) {
- IntPair next_key = IntPair(E->get().first, E->get().second + 1);
+ if (E.second < animation->track_get_key_count(E.first) - 1) {
+ IntPair next_key = IntPair(E.first, E.second + 1);
focused_keys.insert(next_key);
}
}
@@ -873,8 +873,8 @@ void AnimationBezierTrackEdit::gui_input(const Ref<InputEvent> &p_event) {
float minimum_value = INFINITY;
float maximum_value = -INFINITY;
- for (SelectionSet::Element *E = focused_keys.front(); E; E = E->next()) {
- IntPair key_pair = E->get();
+ for (const IntPair &E : selection) {
+ IntPair key_pair = E;
float time = animation->track_get_key_time(key_pair.first, key_pair.second);
float value = animation->bezier_track_get_key_value(key_pair.first, key_pair.second);
diff --git a/editor/animation_bezier_editor.h b/editor/animation_bezier_editor.h
index cbbc3cc32a..22b58a6703 100644
--- a/editor/animation_bezier_editor.h
+++ b/editor/animation_bezier_editor.h
@@ -32,6 +32,7 @@
#define ANIMATION_BEZIER_EDITOR_H
#include "animation_track_editor.h"
+#include "core/templates/rb_set.h"
class ViewPanner;
@@ -71,8 +72,8 @@ class AnimationBezierTrackEdit : public Control {
};
RBMap<int, RBMap<int, Rect2>> subtrack_icons;
- RBSet<int> locked_tracks;
- RBSet<int> hidden_tracks;
+ HashSet<int> locked_tracks;
+ HashSet<int> hidden_tracks;
int solo_track = -1;
bool is_filtered = false;
diff --git a/editor/animation_track_editor.cpp b/editor/animation_track_editor.cpp
index ad4b7b7d95..fa4f32a351 100644
--- a/editor/animation_track_editor.cpp
+++ b/editor/animation_track_editor.cpp
@@ -5906,7 +5906,7 @@ void AnimationTrackEditor::_edit_menu_pressed(int p_option) {
undo_redo->create_action(TTR("Anim Add RESET Keys"));
Ref<Animation> reset = _create_and_get_reset_animation();
int reset_tracks = reset->get_track_count();
- RBSet<int> tracks_added;
+ HashSet<int> tracks_added;
for (const KeyValue<SelectedKey, KeyInfo> &E : selection) {
const SelectedKey &sk = E.key;
diff --git a/editor/create_dialog.h b/editor/create_dialog.h
index 6526116b09..3ab27ea58c 100644
--- a/editor/create_dialog.h
+++ b/editor/create_dialog.h
@@ -64,7 +64,7 @@ class CreateDialog : public ConfirmationDialog {
HashMap<String, String> custom_type_parents;
HashMap<String, int> custom_type_indices;
List<StringName> type_list;
- RBSet<StringName> type_blacklist;
+ HashSet<StringName> type_blacklist;
void _update_search();
bool _should_hide_type(const String &p_type) const;
diff --git a/editor/debugger/editor_debugger_inspector.cpp b/editor/debugger/editor_debugger_inspector.cpp
index 0dd7b44b68..c5093494c6 100644
--- a/editor/debugger/editor_debugger_inspector.cpp
+++ b/editor/debugger/editor_debugger_inspector.cpp
@@ -146,7 +146,7 @@ ObjectID EditorDebuggerInspector::add_object(const Array &p_arr) {
debugObj->prop_list.clear();
int new_props_added = 0;
- RBSet<String> changed;
+ HashSet<String> changed;
for (int i = 0; i < obj.properties.size(); i++) {
PropertyInfo &pinfo = obj.properties[i].first;
Variant &var = obj.properties[i].second;
diff --git a/editor/debugger/editor_debugger_inspector.h b/editor/debugger/editor_debugger_inspector.h
index 72b259c8b5..0e73928558 100644
--- a/editor/debugger/editor_debugger_inspector.h
+++ b/editor/debugger/editor_debugger_inspector.h
@@ -69,7 +69,7 @@ class EditorDebuggerInspector : public EditorInspector {
private:
ObjectID inspected_object_id;
HashMap<ObjectID, EditorDebuggerRemoteObject *> remote_objects;
- RBSet<Ref<Resource>> remote_dependencies;
+ HashSet<Ref<Resource>> remote_dependencies;
EditorDebuggerRemoteObject *variables = nullptr;
void _object_selected(ObjectID p_object);
diff --git a/editor/debugger/editor_debugger_node.h b/editor/debugger/editor_debugger_node.h
index 40e9cf47f9..87457fc09a 100644
--- a/editor/debugger/editor_debugger_node.h
+++ b/editor/debugger/editor_debugger_node.h
@@ -112,7 +112,7 @@ private:
CameraOverride camera_override = OVERRIDE_NONE;
HashMap<Breakpoint, bool, Breakpoint> breakpoints;
- RBSet<Ref<Script>> debugger_plugins;
+ HashSet<Ref<Script>> debugger_plugins;
ScriptEditorDebugger *_add_debugger();
EditorDebuggerRemoteObject *get_inspected_remote_object();
diff --git a/editor/debugger/editor_debugger_tree.h b/editor/debugger/editor_debugger_tree.h
index 8ba03367c9..4e38f00ffa 100644
--- a/editor/debugger/editor_debugger_tree.h
+++ b/editor/debugger/editor_debugger_tree.h
@@ -48,7 +48,7 @@ private:
ObjectID inspected_object_id;
int debugger_id = 0;
bool updating_scene_tree = false;
- RBSet<ObjectID> unfold_cache;
+ HashSet<ObjectID> unfold_cache;
PopupMenu *item_menu = nullptr;
EditorFileDialog *file_dialog = nullptr;
String last_filter;
diff --git a/editor/debugger/editor_performance_profiler.cpp b/editor/debugger/editor_performance_profiler.cpp
index 897c5ae7da..ed451ed68e 100644
--- a/editor/debugger/editor_performance_profiler.cpp
+++ b/editor/debugger/editor_performance_profiler.cpp
@@ -203,7 +203,7 @@ void EditorPerformanceProfiler::_monitor_draw() {
}
void EditorPerformanceProfiler::_build_monitor_tree() {
- RBSet<StringName> monitor_checked;
+ HashSet<StringName> monitor_checked;
for (KeyValue<StringName, Monitor> &E : monitors) {
if (E.value.item && E.value.item->is_checked(0)) {
monitor_checked.insert(E.key);
diff --git a/editor/debugger/editor_profiler.cpp b/editor/debugger/editor_profiler.cpp
index 9899e91c5a..f2bb63e528 100644
--- a/editor/debugger/editor_profiler.cpp
+++ b/editor/debugger/editor_profiler.cpp
@@ -515,7 +515,7 @@ Vector<Vector<String>> EditorProfiler::get_data_as_csv() const {
}
// Different metrics may contain different number of categories.
- RBSet<StringName> possible_signatures;
+ HashSet<StringName> possible_signatures;
for (int i = 0; i < frame_metrics.size(); i++) {
const Metric &m = frame_metrics[i];
if (!m.valid) {
diff --git a/editor/debugger/editor_profiler.h b/editor/debugger/editor_profiler.h
index 77fbb254dc..cb01a1819f 100644
--- a/editor/debugger/editor_profiler.h
+++ b/editor/debugger/editor_profiler.h
@@ -98,7 +98,7 @@ private:
Tree *variables = nullptr;
HSplitContainer *h_split = nullptr;
- RBSet<StringName> plot_sigs;
+ HashSet<StringName> plot_sigs;
OptionButton *display_mode = nullptr;
OptionButton *display_time = nullptr;
diff --git a/editor/doc_tools.cpp b/editor/doc_tools.cpp
index 65216d7664..e6cd1e0b48 100644
--- a/editor/doc_tools.cpp
+++ b/editor/doc_tools.cpp
@@ -331,7 +331,7 @@ void DocTools::generate(bool p_basic_types) {
bool skip_setter_getter_methods = true;
while (classes.size()) {
- RBSet<StringName> setters_getters;
+ HashSet<StringName> setters_getters;
String name = classes.front()->get();
if (!ClassDB::is_class_exposed(name)) {
diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp
index b696bc3ac6..ef29448854 100644
--- a/editor/editor_asset_installer.cpp
+++ b/editor/editor_asset_installer.cpp
@@ -62,7 +62,7 @@ void EditorAssetInstaller::_check_propagated_to_item(Object *p_obj, int column)
void EditorAssetInstaller::open(const String &p_path, int p_depth) {
package_path = p_path;
- RBSet<String> files_sorted;
+ HashSet<String> files_sorted;
Ref<FileAccess> io_fa;
zlib_filefunc_def io = zipio_create_io(&io_fa);
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp
index 0bb48db09e..64c234a07c 100644
--- a/editor/editor_data.cpp
+++ b/editor/editor_data.cpp
@@ -549,7 +549,7 @@ void EditorData::remove_scene(int p_idx) {
edited_scene.remove_at(p_idx);
}
-bool EditorData::_find_updated_instances(Node *p_root, Node *p_node, RBSet<String> &checked_paths) {
+bool EditorData::_find_updated_instances(Node *p_root, Node *p_node, HashSet<String> &checked_paths) {
Ref<SceneState> ss;
if (p_node == p_root) {
@@ -587,7 +587,7 @@ bool EditorData::check_and_update_scene(int p_idx) {
return false;
}
- RBSet<String> checked_scenes;
+ HashSet<String> checked_scenes;
bool must_reload = _find_updated_instances(edited_scene[p_idx].root, edited_scene[p_idx].root, checked_scenes);
diff --git a/editor/editor_data.h b/editor/editor_data.h
index b9eb199c37..351c63f4b9 100644
--- a/editor/editor_data.h
+++ b/editor/editor_data.h
@@ -139,7 +139,7 @@ private:
Vector<EditedScene> edited_scene;
int current_edited_scene;
- bool _find_updated_instances(Node *p_root, Node *p_node, RBSet<String> &checked_paths);
+ bool _find_updated_instances(Node *p_root, Node *p_node, HashSet<String> &checked_paths);
HashMap<StringName, String> _script_class_icon_paths;
HashMap<String, StringName> _script_class_file_to_path;
diff --git a/editor/editor_dir_dialog.h b/editor/editor_dir_dialog.h
index 60abfeb66f..95ca0d32b9 100644
--- a/editor/editor_dir_dialog.h
+++ b/editor/editor_dir_dialog.h
@@ -44,7 +44,7 @@ class EditorDirDialog : public ConfirmationDialog {
AcceptDialog *mkdirerr = nullptr;
Button *makedir = nullptr;
- RBSet<String> opened_paths;
+ HashSet<String> opened_paths;
Tree *tree = nullptr;
bool updating = false;
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 586ffa418c..f4a81521df 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -446,7 +446,7 @@ Ref<EditorExportPreset> EditorExportPlatform::create_preset() {
return preset;
}
-void EditorExportPlatform::_export_find_resources(EditorFileSystemDirectory *p_dir, RBSet<String> &p_paths) {
+void EditorExportPlatform::_export_find_resources(EditorFileSystemDirectory *p_dir, HashSet<String> &p_paths) {
for (int i = 0; i < p_dir->get_subdir_count(); i++) {
_export_find_resources(p_dir->get_subdir(i), p_paths);
}
@@ -459,7 +459,7 @@ void EditorExportPlatform::_export_find_resources(EditorFileSystemDirectory *p_d
}
}
-void EditorExportPlatform::_export_find_dependencies(const String &p_path, RBSet<String> &p_paths) {
+void EditorExportPlatform::_export_find_dependencies(const String &p_path, HashSet<String> &p_paths) {
if (p_paths.has(p_path)) {
return;
}
@@ -480,7 +480,7 @@ void EditorExportPlatform::_export_find_dependencies(const String &p_path, RBSet
}
}
-void EditorExportPlatform::_edit_files_with_filter(Ref<DirAccess> &da, const Vector<String> &p_filters, RBSet<String> &r_list, bool exclude) {
+void EditorExportPlatform::_edit_files_with_filter(Ref<DirAccess> &da, const Vector<String> &p_filters, HashSet<String> &r_list, bool exclude) {
da->list_dir_begin();
String cur_dir = da->get_current_dir().replace("\\", "/");
if (!cur_dir.ends_with("/")) {
@@ -528,7 +528,7 @@ void EditorExportPlatform::_edit_files_with_filter(Ref<DirAccess> &da, const Vec
}
}
-void EditorExportPlatform::_edit_filter_list(RBSet<String> &r_list, const String &p_filter, bool exclude) {
+void EditorExportPlatform::_edit_filter_list(HashSet<String> &r_list, const String &p_filter, bool exclude) {
if (p_filter.is_empty()) {
return;
}
@@ -648,10 +648,10 @@ void EditorExportPlugin::_export_end_script() {
GDVIRTUAL_CALL(_export_end);
}
-void EditorExportPlugin::_export_file(const String &p_path, const String &p_type, const RBSet<String> &p_features) {
+void EditorExportPlugin::_export_file(const String &p_path, const String &p_type, const HashSet<String> &p_features) {
}
-void EditorExportPlugin::_export_begin(const RBSet<String> &p_features, bool p_debug, const String &p_path, int p_flags) {
+void EditorExportPlugin::_export_begin(const HashSet<String> &p_features, bool p_debug, const String &p_path, int p_flags) {
}
void EditorExportPlugin::skip() {
@@ -739,7 +739,7 @@ EditorExportPlatform::ExportNotifier::~ExportNotifier() {
Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &p_preset, bool p_debug, EditorExportSaveFunction p_func, void *p_udata, EditorExportSaveSharedObject p_so_func) {
//figure out paths of files that will be exported
- RBSet<String> paths;
+ HashSet<String> paths;
Vector<String> path_remaps;
if (p_preset->get_export_filter() == EditorExportPreset::EXPORT_ALL_RESOURCES) {
@@ -872,7 +872,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
}
FeatureContainers feature_containers = get_feature_containers(p_preset, p_debug);
- RBSet<String> &features = feature_containers.features;
+ HashSet<String> &features = feature_containers.features;
Vector<String> &features_pv = feature_containers.features_pv;
//store everything in the export medium
@@ -910,7 +910,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
List<String> remaps;
config->get_section_keys("remap", &remaps);
- RBSet<String> remap_features;
+ HashSet<String> remap_features;
for (const String &F : remaps) {
String remap = F;
@@ -1934,7 +1934,7 @@ void EditorExportPlatformPC::get_platform_features(List<String> *r_features) {
r_features->push_back(get_os_name().to_lower()); //OS name is a feature
}
-void EditorExportPlatformPC::resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, RBSet<String> &p_features) {
+void EditorExportPlatformPC::resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, HashSet<String> &p_features) {
if (p_features.has("bptc")) {
if (p_preset->has("texture_format/no_bptc_fallbacks")) {
p_features.erase("s3tc");
@@ -1952,7 +1952,7 @@ void EditorExportPlatformPC::set_chmod_flags(int p_flags) {
///////////////////////
-void EditorExportTextSceneToBinaryPlugin::_export_file(const String &p_path, const String &p_type, const RBSet<String> &p_features) {
+void EditorExportTextSceneToBinaryPlugin::_export_file(const String &p_path, const String &p_type, const HashSet<String> &p_features) {
String extension = p_path.get_extension().to_lower();
if (extension != "tres" && extension != "tscn") {
return;
diff --git a/editor/editor_export.h b/editor/editor_export.h
index 3b8ff0f686..daf6d8ef23 100644
--- a/editor/editor_export.h
+++ b/editor/editor_export.h
@@ -66,7 +66,7 @@ private:
String export_path;
String exporter;
- RBSet<String> selected_files;
+ HashSet<String> selected_files;
bool runnable = false;
friend class EditorExport;
@@ -196,19 +196,19 @@ private:
};
struct FeatureContainers {
- RBSet<String> features;
+ HashSet<String> features;
Vector<String> features_pv;
};
- void _export_find_resources(EditorFileSystemDirectory *p_dir, RBSet<String> &p_paths);
- void _export_find_dependencies(const String &p_path, RBSet<String> &p_paths);
+ void _export_find_resources(EditorFileSystemDirectory *p_dir, HashSet<String> &p_paths);
+ void _export_find_dependencies(const String &p_path, HashSet<String> &p_paths);
void gen_debug_flags(Vector<String> &r_flags, int p_flags);
static Error _save_pack_file(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total, const Vector<String> &p_enc_in_filters, const Vector<String> &p_enc_ex_filters, const Vector<uint8_t> &p_key);
static Error _save_zip_file(void *p_userdata, const String &p_path, const Vector<uint8_t> &p_data, int p_file, int p_total, const Vector<String> &p_enc_in_filters, const Vector<String> &p_enc_ex_filters, const Vector<uint8_t> &p_key);
- void _edit_files_with_filter(Ref<DirAccess> &da, const Vector<String> &p_filters, RBSet<String> &r_list, bool exclude);
- void _edit_filter_list(RBSet<String> &r_list, const String &p_filter, bool exclude);
+ void _edit_files_with_filter(Ref<DirAccess> &da, const Vector<String> &p_filters, HashSet<String> &r_list, bool exclude);
+ void _edit_filter_list(HashSet<String> &r_list, const String &p_filter, bool exclude);
static Error _add_shared_object(void *p_userdata, const SharedObject &p_so);
@@ -279,7 +279,7 @@ public:
virtual Error export_pack(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0);
virtual Error export_zip(const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags = 0);
virtual void get_platform_features(List<String> *r_features) = 0;
- virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, RBSet<String> &p_features) = 0;
+ virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, HashSet<String> &p_features) = 0;
virtual String get_debug_protocol() const { return "tcp://"; }
EditorExportPlatform();
@@ -349,8 +349,8 @@ protected:
void skip();
- virtual void _export_file(const String &p_path, const String &p_type, const RBSet<String> &p_features);
- virtual void _export_begin(const RBSet<String> &p_features, bool p_debug, const String &p_path, int p_flags);
+ virtual void _export_file(const String &p_path, const String &p_type, const HashSet<String> &p_features);
+ virtual void _export_begin(const HashSet<String> &p_features, bool p_debug, const String &p_path, int p_flags);
static void _bind_methods();
@@ -454,7 +454,7 @@ public:
void add_platform_feature(const String &p_feature);
virtual void get_platform_features(List<String> *r_features) override;
- virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, RBSet<String> &p_features) override;
+ virtual void resolve_platform_feature_priorities(const Ref<EditorExportPreset> &p_preset, HashSet<String> &p_features) override;
int get_chmod_flags() const;
void set_chmod_flags(int p_flags);
@@ -468,7 +468,7 @@ class EditorExportTextSceneToBinaryPlugin : public EditorExportPlugin {
GDCLASS(EditorExportTextSceneToBinaryPlugin, EditorExportPlugin);
public:
- virtual void _export_file(const String &p_path, const String &p_type, const RBSet<String> &p_features) override;
+ virtual void _export_file(const String &p_path, const String &p_type, const HashSet<String> &p_features) override;
EditorExportTextSceneToBinaryPlugin();
};
diff --git a/editor/editor_feature_profile.cpp b/editor/editor_feature_profile.cpp
index 670f193326..f8fc28c31c 100644
--- a/editor/editor_feature_profile.cpp
+++ b/editor/editor_feature_profile.cpp
@@ -101,7 +101,7 @@ bool EditorFeatureProfile::is_class_editor_disabled(const StringName &p_class) c
void EditorFeatureProfile::set_disable_class_property(const StringName &p_class, const StringName &p_property, bool p_disabled) {
if (p_disabled) {
if (!disabled_properties.has(p_class)) {
- disabled_properties[p_class] = RBSet<StringName>();
+ disabled_properties[p_class] = HashSet<StringName>();
}
disabled_properties[p_class].insert(p_property);
@@ -181,7 +181,7 @@ Error EditorFeatureProfile::save_to_file(const String &p_path) {
Array dis_props;
- for (KeyValue<StringName, RBSet<StringName>> &E : disabled_properties) {
+ for (KeyValue<StringName, HashSet<StringName>> &E : disabled_properties) {
for (const StringName &F : E.value) {
dis_props.push_back(String(E.key) + ":" + String(F));
}
diff --git a/editor/editor_feature_profile.h b/editor/editor_feature_profile.h
index 479baf5205..dab6c951e4 100644
--- a/editor/editor_feature_profile.h
+++ b/editor/editor_feature_profile.h
@@ -56,11 +56,11 @@ public:
};
private:
- RBSet<StringName> disabled_classes;
- RBSet<StringName> disabled_editors;
- HashMap<StringName, RBSet<StringName>> disabled_properties;
+ HashSet<StringName> disabled_classes;
+ HashSet<StringName> disabled_editors;
+ HashMap<StringName, HashSet<StringName>> disabled_properties;
- RBSet<StringName> collapsed_classes;
+ HashSet<StringName> collapsed_classes;
bool features_disabled[FEATURE_MAX];
static const char *feature_names[FEATURE_MAX];
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index e37bfa32bc..f9a4c14c48 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -1636,7 +1636,7 @@ void EditorFileSystem::update_file(const String &p_file) {
_queue_update_script_classes();
}
-RBSet<String> EditorFileSystem::get_valid_extensions() const {
+HashSet<String> EditorFileSystem::get_valid_extensions() const {
return valid_extensions;
}
@@ -2047,7 +2047,7 @@ void EditorFileSystem::_reimport_file(const String &p_file, const HashMap<String
EditorResourcePreview::get_singleton()->check_for_invalidation(p_file);
}
-void EditorFileSystem::_find_group_files(EditorFileSystemDirectory *efd, HashMap<String, Vector<String>> &group_files, RBSet<String> &groups_to_reimport) {
+void EditorFileSystem::_find_group_files(EditorFileSystemDirectory *efd, HashMap<String, Vector<String>> &group_files, HashSet<String> &groups_to_reimport) {
int fc = efd->files.size();
const EditorFileSystemDirectory::FileInfo *const *files = efd->files.ptr();
for (int i = 0; i < fc; i++) {
@@ -2079,7 +2079,7 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) {
Vector<ImportFile> reimport_files;
- RBSet<String> groups_to_reimport;
+ HashSet<String> groups_to_reimport;
for (int i = 0; i < p_files.size(); i++) {
String file = p_files[i];
@@ -2290,7 +2290,7 @@ ResourceUID::ID EditorFileSystem::_resource_saver_get_resource_id_for_path(const
}
}
-static void _scan_extensions_dir(EditorFileSystemDirectory *d, RBSet<String> &extensions) {
+static void _scan_extensions_dir(EditorFileSystemDirectory *d, HashSet<String> &extensions) {
int fc = d->get_file_count();
for (int i = 0; i < fc; i++) {
if (d->get_file_type(i) == SNAME("NativeExtension")) {
@@ -2304,7 +2304,7 @@ static void _scan_extensions_dir(EditorFileSystemDirectory *d, RBSet<String> &ex
}
bool EditorFileSystem::_scan_extensions() {
EditorFileSystemDirectory *d = get_filesystem();
- RBSet<String> extensions;
+ HashSet<String> extensions;
_scan_extensions_dir(d, extensions);
diff --git a/editor/editor_file_system.h b/editor/editor_file_system.h
index 743684a9ca..07b1132046 100644
--- a/editor/editor_file_system.h
+++ b/editor/editor_file_system.h
@@ -34,7 +34,7 @@
#include "core/io/dir_access.h"
#include "core/os/thread.h"
#include "core/os/thread_safe.h"
-#include "core/templates/rb_set.h"
+#include "core/templates/hash_set.h"
#include "core/templates/safe_refcount.h"
#include "core/templates/thread_work_pool.h"
#include "scene/main/node.h"
@@ -180,7 +180,7 @@ class EditorFileSystem : public Node {
void _scan_filesystem();
- RBSet<String> late_update_files;
+ HashSet<String> late_update_files;
void _save_late_updated_files();
@@ -221,9 +221,9 @@ class EditorFileSystem : public Node {
void _delete_internal_files(String p_file);
- RBSet<String> textfile_extensions;
- RBSet<String> valid_extensions;
- RBSet<String> import_extensions;
+ HashSet<String> textfile_extensions;
+ HashSet<String> valid_extensions;
+ HashSet<String> import_extensions;
void _scan_new_dir(EditorFileSystemDirectory *p_dir, Ref<DirAccess> &da, const ScanProgress &p_progress);
@@ -269,11 +269,11 @@ class EditorFileSystem : public Node {
bool using_fat32_or_exfat; // Workaround for projects in FAT32 or exFAT filesystem (pendrives, most of the time)
- void _find_group_files(EditorFileSystemDirectory *efd, HashMap<String, Vector<String>> &group_files, RBSet<String> &groups_to_reimport);
+ void _find_group_files(EditorFileSystemDirectory *efd, HashMap<String, Vector<String>> &group_files, HashSet<String> &groups_to_reimport);
void _move_group_files(EditorFileSystemDirectory *efd, const String &p_group_file, const String &p_new_location);
- RBSet<String> group_file_cache;
+ HashSet<String> group_file_cache;
ThreadWorkPool import_threads;
@@ -306,7 +306,7 @@ public:
void scan();
void scan_changes();
void update_file(const String &p_file);
- RBSet<String> get_valid_extensions() const;
+ HashSet<String> get_valid_extensions() const;
EditorFileSystemDirectory *get_filesystem_path(const String &p_path);
String get_file_type(const String &p_file) const;
diff --git a/editor/editor_folding.cpp b/editor/editor_folding.cpp
index ad8aaf324c..9e1b361f64 100644
--- a/editor/editor_folding.cpp
+++ b/editor/editor_folding.cpp
@@ -87,7 +87,7 @@ void EditorFolding::load_resource_folding(Ref<Resource> p_resource, const String
_set_unfolds(p_resource.ptr(), unfolds);
}
-void EditorFolding::_fill_folds(const Node *p_root, const Node *p_node, Array &p_folds, Array &resource_folds, Array &nodes_folded, RBSet<Ref<Resource>> &resources) {
+void EditorFolding::_fill_folds(const Node *p_root, const Node *p_node, Array &p_folds, Array &resource_folds, Array &nodes_folded, HashSet<Ref<Resource>> &resources) {
if (p_root != p_node) {
if (!p_node->get_owner()) {
return; //not owned, bye
@@ -140,7 +140,7 @@ void EditorFolding::save_scene_folding(const Node *p_scene, const String &p_path
config.instantiate();
Array unfolds, res_unfolds;
- RBSet<Ref<Resource>> resources;
+ HashSet<Ref<Resource>> resources;
Array nodes_folded;
_fill_folds(p_scene, p_scene, unfolds, res_unfolds, nodes_folded, resources);
@@ -220,13 +220,13 @@ bool EditorFolding::has_folding_data(const String &p_path) {
return FileAccess::exists(file);
}
-void EditorFolding::_do_object_unfolds(Object *p_object, RBSet<Ref<Resource>> &resources) {
+void EditorFolding::_do_object_unfolds(Object *p_object, HashSet<Ref<Resource>> &resources) {
List<PropertyInfo> plist;
p_object->get_property_list(&plist);
String group_base;
String group;
- RBSet<String> unfold_group;
+ HashSet<String> unfold_group;
for (const PropertyInfo &E : plist) {
if (E.usage & PROPERTY_USAGE_CATEGORY) {
@@ -275,7 +275,7 @@ void EditorFolding::_do_object_unfolds(Object *p_object, RBSet<Ref<Resource>> &r
}
}
-void EditorFolding::_do_node_unfolds(Node *p_root, Node *p_node, RBSet<Ref<Resource>> &resources) {
+void EditorFolding::_do_node_unfolds(Node *p_root, Node *p_node, HashSet<Ref<Resource>> &resources) {
if (p_root != p_node) {
if (!p_node->get_owner()) {
return; //not owned, bye
@@ -293,7 +293,7 @@ void EditorFolding::_do_node_unfolds(Node *p_root, Node *p_node, RBSet<Ref<Resou
}
void EditorFolding::unfold_scene(Node *p_scene) {
- RBSet<Ref<Resource>> resources;
+ HashSet<Ref<Resource>> resources;
_do_node_unfolds(p_scene, p_scene, resources);
}
diff --git a/editor/editor_folding.h b/editor/editor_folding.h
index 22df06280a..9a2aa37b80 100644
--- a/editor/editor_folding.h
+++ b/editor/editor_folding.h
@@ -37,10 +37,10 @@ class EditorFolding {
Vector<String> _get_unfolds(const Object *p_object);
void _set_unfolds(Object *p_object, const Vector<String> &p_unfolds);
- void _fill_folds(const Node *p_root, const Node *p_node, Array &p_folds, Array &resource_folds, Array &nodes_folded, RBSet<Ref<Resource>> &resources);
+ void _fill_folds(const Node *p_root, const Node *p_node, Array &p_folds, Array &resource_folds, Array &nodes_folded, HashSet<Ref<Resource>> &resources);
- void _do_object_unfolds(Object *p_object, RBSet<Ref<Resource>> &resources);
- void _do_node_unfolds(Node *p_root, Node *p_node, RBSet<Ref<Resource>> &resources);
+ void _do_object_unfolds(Object *p_object, HashSet<Ref<Resource>> &resources);
+ void _do_node_unfolds(Node *p_root, Node *p_node, HashSet<Ref<Resource>> &resources);
public:
void save_resource_folding(const Ref<Resource> &p_resource, const String &p_path);
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index d6278a63fe..77c4fc71a4 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -648,7 +648,7 @@ void EditorHelp::_update_doc() {
}
// Properties overview
- RBSet<String> skip_methods;
+ HashSet<String> skip_methods;
bool property_descr = false;
bool has_properties = cd.properties.size() != 0;
diff --git a/editor/editor_inspector.cpp b/editor/editor_inspector.cpp
index f534130735..4bc37456d5 100644
--- a/editor/editor_inspector.cpp
+++ b/editor/editor_inspector.cpp
@@ -839,7 +839,7 @@ void EditorProperty::_update_pin_flags() {
}
pin_hidden = false;
{
- RBSet<StringName> storable_properties;
+ HashSet<StringName> storable_properties;
node->get_storable_properties(storable_properties);
if (storable_properties.has(node->get_property_store_alias(property))) {
can_pin = true;
@@ -3543,7 +3543,7 @@ void EditorInspector::_notification(int p_what) {
} else {
while (pending.size()) {
- StringName prop = pending.front()->get();
+ StringName prop = *pending.begin();
if (editor_property_map.has(prop)) {
for (EditorProperty *E : editor_property_map[prop]) {
E->update_property();
@@ -3551,7 +3551,7 @@ void EditorInspector::_notification(int p_what) {
E->update_cache();
}
}
- pending.erase(pending.front());
+ pending.remove(pending.begin());
}
}
@@ -3638,7 +3638,7 @@ void EditorInspector::_update_script_class_properties(const Object &p_object, Li
break;
}
- RBSet<StringName> added;
+ HashSet<StringName> added;
for (const Ref<Script> &s : classes) {
String path = s->get_path();
String name = EditorNode::get_editor_data().script_class_get_name(path);
diff --git a/editor/editor_inspector.h b/editor/editor_inspector.h
index 7609f4fdcc..30c0cffe40 100644
--- a/editor/editor_inspector.h
+++ b/editor/editor_inspector.h
@@ -437,7 +437,7 @@ class EditorInspector : public ScrollContainer {
//map use to cache the instantiated editors
HashMap<StringName, List<EditorProperty *>> editor_property_map;
List<EditorInspectorSection *> sections;
- RBSet<StringName> pending;
+ HashSet<StringName> pending;
void _clear();
Object *object = nullptr;
@@ -470,7 +470,7 @@ class EditorInspector : public ScrollContainer {
HashMap<StringName, HashMap<StringName, String>> descr_cache;
HashMap<StringName, String> class_descr_cache;
- RBSet<StringName> restart_request_props;
+ HashSet<StringName> restart_request_props;
HashMap<ObjectID, int> scroll_cache;
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index f2baaf8b5c..4998cc82e8 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -800,7 +800,7 @@ void EditorNode::_notification(int p_what) {
main_editor_buttons.write[i]->add_theme_font_size_override("font_size", gui_base->get_theme_font_size(SNAME("main_button_font_size"), SNAME("EditorFonts")));
}
- RBSet<String> updated_textfile_extensions;
+ HashSet<String> updated_textfile_extensions;
bool extensions_match = true;
const Vector<String> textfile_ext = ((String)(EditorSettings::get_singleton()->get("docks/filesystem/textfile_extensions"))).split(",", false);
for (const String &E : textfile_ext) {
@@ -1622,7 +1622,7 @@ bool EditorNode::_validate_scene_recursive(const String &p_filename, Node *p_nod
return false;
}
-static bool _find_edited_resources(const Ref<Resource> &p_resource, RBSet<Ref<Resource>> &edited_resources) {
+static bool _find_edited_resources(const Ref<Resource> &p_resource, HashSet<Ref<Resource>> &edited_resources) {
if (p_resource->is_edited()) {
edited_resources.insert(p_resource);
return true;
@@ -1659,7 +1659,7 @@ int EditorNode::_save_external_resources() {
}
flg |= ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS;
- RBSet<Ref<Resource>> edited_subresources;
+ HashSet<Ref<Resource>> edited_subresources;
int saved = 0;
List<Ref<Resource>> cached;
ResourceCache::get_cached_resources(&cached);
@@ -3678,7 +3678,7 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
dependency_errors.erase(lpath); // At least not self path.
- for (KeyValue<String, RBSet<String>> &E : dependency_errors) {
+ for (KeyValue<String, HashSet<String>> &E : dependency_errors) {
String txt = vformat(TTR("Scene '%s' has broken dependencies:"), E.key) + "\n";
for (const String &F : E.value) {
txt += "\t" + F + "\n";
diff --git a/editor/editor_node.h b/editor/editor_node.h
index 9cd96050e3..48df767562 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -394,7 +394,7 @@ private:
BackgroundProgress *progress_hb = nullptr;
DependencyErrorDialog *dependency_error = nullptr;
- HashMap<String, RBSet<String>> dependency_errors;
+ HashMap<String, HashSet<String>> dependency_errors;
DependencyEditor *dependency_fixer = nullptr;
OrphanResourcesDialog *orphan_resources = nullptr;
ConfirmationDialog *open_imported = nullptr;
@@ -470,9 +470,9 @@ private:
String import_reload_fn;
- RBSet<String> textfile_extensions;
- RBSet<FileDialog *> file_dialogs;
- RBSet<EditorFileDialog *> editor_file_dialogs;
+ HashSet<String> textfile_extensions;
+ HashSet<FileDialog *> file_dialogs;
+ HashSet<EditorFileDialog *> editor_file_dialogs;
Vector<Ref<EditorResourceConversionPlugin>> resource_conversion_plugins;
PrintHandlerList print_handler;
@@ -489,7 +489,7 @@ private:
static void _dependency_error_report(void *ud, const String &p_path, const String &p_dep, const String &p_type) {
EditorNode *en = static_cast<EditorNode *>(ud);
if (!en->dependency_errors.has(p_path)) {
- en->dependency_errors[p_path] = RBSet<String>();
+ en->dependency_errors[p_path] = HashSet<String>();
}
en->dependency_errors[p_path].insert(p_dep + "::" + p_type);
}
diff --git a/editor/editor_resource_picker.cpp b/editor/editor_resource_picker.cpp
index cb3000ee88..34aa7217fa 100644
--- a/editor/editor_resource_picker.cpp
+++ b/editor/editor_resource_picker.cpp
@@ -240,7 +240,7 @@ void EditorResourcePicker::_edit_menu_cbk(int p_which) {
ResourceLoader::get_recognized_extensions_for_type(base, &extensions);
}
- RBSet<String> valid_extensions;
+ HashSet<String> valid_extensions;
for (const String &E : extensions) {
valid_extensions.insert(E);
}
@@ -409,7 +409,7 @@ void EditorResourcePicker::set_create_options(Object *p_menu_node) {
if (!base_type.is_empty()) {
int idx = 0;
- RBSet<String> allowed_types;
+ HashSet<String> allowed_types;
_get_allowed_types(false, &allowed_types);
Vector<EditorData::CustomType> custom_resources;
@@ -491,7 +491,7 @@ void EditorResourcePicker::_button_input(const Ref<InputEvent> &p_event) {
}
}
-void EditorResourcePicker::_get_allowed_types(bool p_with_convert, RBSet<String> *p_vector) const {
+void EditorResourcePicker::_get_allowed_types(bool p_with_convert, HashSet<String> *p_vector) const {
Vector<String> allowed_types = base_type.split(",");
int size = allowed_types.size();
@@ -568,7 +568,7 @@ bool EditorResourcePicker::_is_drop_valid(const Dictionary &p_drag_data) const {
res = drag_data["resource"];
}
- RBSet<String> allowed_types;
+ HashSet<String> allowed_types;
_get_allowed_types(true, &allowed_types);
if (res.is_valid() && _is_type_valid(res->get_class(), allowed_types)) {
@@ -598,7 +598,7 @@ bool EditorResourcePicker::_is_drop_valid(const Dictionary &p_drag_data) const {
return false;
}
-bool EditorResourcePicker::_is_type_valid(const String p_type_name, RBSet<String> p_allowed_types) const {
+bool EditorResourcePicker::_is_type_valid(const String p_type_name, HashSet<String> p_allowed_types) const {
for (const String &E : p_allowed_types) {
String at = E.strip_edges();
if (p_type_name == at || ClassDB::is_parent_class(p_type_name, at) || EditorNode::get_editor_data().script_class_is_parent(p_type_name, at)) {
@@ -646,7 +646,7 @@ void EditorResourcePicker::drop_data_fw(const Point2 &p_point, const Variant &p_
}
if (dropped_resource.is_valid()) {
- RBSet<String> allowed_types;
+ HashSet<String> allowed_types;
_get_allowed_types(false, &allowed_types);
// If the accepted dropped resource is from the extended list, it requires conversion.
@@ -768,7 +768,7 @@ void EditorResourcePicker::set_base_type(const String &p_base_type) {
// There is a possibility that the new base type is conflicting with the existing value.
// Keep the value, but warn the user that there is a potential mistake.
if (!base_type.is_empty() && edited_resource.is_valid()) {
- RBSet<String> allowed_types;
+ HashSet<String> allowed_types;
_get_allowed_types(true, &allowed_types);
StringName custom_class;
@@ -784,7 +784,7 @@ void EditorResourcePicker::set_base_type(const String &p_base_type) {
}
} else {
// Call the method to build the cache immediately.
- RBSet<String> allowed_types;
+ HashSet<String> allowed_types;
_get_allowed_types(false, &allowed_types);
}
}
@@ -794,7 +794,7 @@ String EditorResourcePicker::get_base_type() const {
}
Vector<String> EditorResourcePicker::get_allowed_types() const {
- RBSet<String> allowed_types;
+ HashSet<String> allowed_types;
_get_allowed_types(false, &allowed_types);
Vector<String> types;
@@ -802,8 +802,9 @@ Vector<String> EditorResourcePicker::get_allowed_types() const {
int i = 0;
String *w = types.ptrw();
- for (RBSet<String>::Element *E = allowed_types.front(); E; E = E->next(), i++) {
- w[i] = E->get();
+ for (const String &E : allowed_types) {
+ w[i] = E;
+ i++;
}
return types;
@@ -817,7 +818,7 @@ void EditorResourcePicker::set_edited_resource(Ref<Resource> p_resource) {
}
if (!base_type.is_empty()) {
- RBSet<String> allowed_types;
+ HashSet<String> allowed_types;
_get_allowed_types(true, &allowed_types);
StringName custom_class;
diff --git a/editor/editor_resource_picker.h b/editor/editor_resource_picker.h
index f2dc45513d..8e26e1f4c0 100644
--- a/editor/editor_resource_picker.h
+++ b/editor/editor_resource_picker.h
@@ -89,9 +89,9 @@ class EditorResourcePicker : public HBoxContainer {
void _button_draw();
void _button_input(const Ref<InputEvent> &p_event);
- void _get_allowed_types(bool p_with_convert, RBSet<String> *p_vector) const;
+ void _get_allowed_types(bool p_with_convert, HashSet<String> *p_vector) const;
bool _is_drop_valid(const Dictionary &p_drag_data) const;
- bool _is_type_valid(const String p_type_name, RBSet<String> p_allowed_types) const;
+ bool _is_type_valid(const String p_type_name, HashSet<String> p_allowed_types) const;
Variant get_drag_data_fw(const Point2 &p_point, Control *p_from);
bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
diff --git a/editor/editor_settings.h b/editor/editor_settings.h
index e270a882e2..43f90f9258 100644
--- a/editor/editor_settings.h
+++ b/editor/editor_settings.h
@@ -34,6 +34,7 @@
#include "core/io/config_file.h"
#include "core/io/resource.h"
#include "core/os/thread_safe.h"
+#include "core/templates/rb_set.h"
class EditorPlugin;
class InputEvent;
@@ -77,7 +78,7 @@ private:
static Ref<EditorSettings> singleton;
- RBSet<String> changed_settings;
+ HashSet<String> changed_settings;
HashMap<String, PropertyInfo> hints;
HashMap<String, VariantContainer> props;
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 567865d4f1..11fe62b84f 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -148,7 +148,7 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme =
// The names of the icons to never convert, even if one of their colors
// are contained in the dictionary above.
- RBSet<StringName> exceptions;
+ HashSet<StringName> exceptions;
// Some of the colors below are listed for completeness sake.
// This can be a basis for proper palette validation later.
@@ -290,7 +290,7 @@ void editor_register_and_generate_icons(Ref<Theme> p_theme, bool p_dark_theme =
// Use the accent color for some icons (checkbox, radio, toggle, etc.).
Dictionary accent_color_icon_color_dictionary;
- RBSet<StringName> accent_color_icons;
+ HashSet<StringName> accent_color_icons;
const Color accent_color = p_theme->get_color(SNAME("accent_color"), SNAME("Editor"));
accent_color_icon_color_dictionary[Color::html("699ce8")] = accent_color;
diff --git a/editor/editor_translation_parser.cpp b/editor/editor_translation_parser.cpp
index ddb084e19b..eb4df3b630 100644
--- a/editor/editor_translation_parser.cpp
+++ b/editor/editor_translation_parser.cpp
@@ -33,7 +33,7 @@
#include "core/error/error_macros.h"
#include "core/io/file_access.h"
#include "core/object/script_language.h"
-#include "core/templates/rb_set.h"
+#include "core/templates/hash_set.h"
EditorTranslationParser *EditorTranslationParser::singleton = nullptr;
@@ -84,7 +84,7 @@ void EditorTranslationParserPlugin::_bind_methods() {
/////////////////////////
void EditorTranslationParser::get_recognized_extensions(List<String> *r_extensions) const {
- RBSet<String> extensions;
+ HashSet<String> extensions;
List<String> temp;
for (int i = 0; i < standard_parsers.size(); i++) {
standard_parsers[i]->get_recognized_extensions(&temp);
diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp
index 50f03652ee..c6d3843b06 100644
--- a/editor/export_template_manager.cpp
+++ b/editor/export_template_manager.cpp
@@ -35,6 +35,7 @@
#include "core/io/json.h"
#include "core/io/zip_io.h"
#include "core/os/keyboard.h"
+#include "core/templates/rb_set.h"
#include "core/version.h"
#include "editor/editor_node.h"
#include "editor/editor_paths.h"
@@ -694,7 +695,7 @@ Error ExportTemplateManager::install_android_template_from_file(const String &p_
ProgressDialog::get_singleton()->add_task("uncompress_src", TTR("Uncompressing Android Build Sources"), total_files);
- RBSet<String> dirs_tested;
+ HashSet<String> dirs_tested;
int idx = 0;
while (ret == UNZ_OK) {
// Get file path.
diff --git a/editor/fileserver/editor_file_server.cpp b/editor/fileserver/editor_file_server.cpp
index eed3917845..718bcb24cc 100644
--- a/editor/fileserver/editor_file_server.cpp
+++ b/editor/fileserver/editor_file_server.cpp
@@ -282,7 +282,7 @@ void EditorFileServer::_thread_start(void *s) {
self->wait_mutex.lock();
while (self->to_wait.size()) {
- Thread *w = self->to_wait.front()->get();
+ Thread *w = *self->to_wait.begin();
self->to_wait.erase(w);
self->wait_mutex.unlock();
w->wait_to_finish();
diff --git a/editor/fileserver/editor_file_server.h b/editor/fileserver/editor_file_server.h
index 21abbc3f8c..03b6ededab 100644
--- a/editor/fileserver/editor_file_server.h
+++ b/editor/fileserver/editor_file_server.h
@@ -55,7 +55,7 @@ class EditorFileServer : public Object {
};
Ref<TCPServer> server;
- RBSet<Thread *> to_wait;
+ HashSet<Thread *> to_wait;
static void _close_client(ClientData *cd);
static void _subthread_start(void *s);
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 4c4d38c074..8a995eaa8f 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -726,7 +726,7 @@ void FileSystemDock::_sort_file_info_list(List<FileSystemDock::FileInfo> &r_file
void FileSystemDock::_update_file_list(bool p_keep_selection) {
// Register the previously selected items.
- RBSet<String> cselection;
+ HashSet<String> cselection;
if (p_keep_selection) {
for (int i = 0; i < files->get_item_count(); i++) {
if (files->is_selected(i)) {
diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h
index df3dd3fd69..40e8b1b7c8 100644
--- a/editor/filesystem_dock.h
+++ b/editor/filesystem_dock.h
@@ -108,7 +108,7 @@ private:
VSplitContainer *split_box = nullptr;
VBoxContainer *file_list_vb = nullptr;
- RBSet<String> favorites;
+ HashSet<String> favorites;
Button *button_toggle_display_mode = nullptr;
Button *button_reload = nullptr;
diff --git a/editor/find_in_files.cpp b/editor/find_in_files.cpp
index aafaccf5be..d60e336f0f 100644
--- a/editor/find_in_files.cpp
+++ b/editor/find_in_files.cpp
@@ -99,7 +99,7 @@ void FindInFiles::set_folder(String folder) {
_root_dir = folder;
}
-void FindInFiles::set_filter(const RBSet<String> &exts) {
+void FindInFiles::set_filter(const HashSet<String> &exts) {
_extension_filter = exts;
}
@@ -443,9 +443,9 @@ String FindInFilesDialog::get_folder() const {
return text.strip_edges();
}
-RBSet<String> FindInFilesDialog::get_filter() const {
+HashSet<String> FindInFilesDialog::get_filter() const {
// Could check the _filters_preferences but it might not have been generated yet.
- RBSet<String> filters;
+ HashSet<String> filters;
for (int i = 0; i < _filters_container->get_child_count(); ++i) {
CheckBox *cb = static_cast<CheckBox *>(_filters_container->get_child(i));
if (cb->is_pressed()) {
diff --git a/editor/find_in_files.h b/editor/find_in_files.h
index 8bc7b506d0..c57a084779 100644
--- a/editor/find_in_files.h
+++ b/editor/find_in_files.h
@@ -46,7 +46,7 @@ public:
void set_whole_words(bool p_whole_word);
void set_match_case(bool p_match_case);
void set_folder(String folder);
- void set_filter(const RBSet<String> &exts);
+ void set_filter(const HashSet<String> &exts);
String get_search_text() const { return _pattern; }
@@ -72,7 +72,7 @@ private:
// Config
String _pattern;
- RBSet<String> _extension_filter;
+ HashSet<String> _extension_filter;
String _root_dir;
bool _whole_words = true;
bool _match_case = true;
@@ -115,7 +115,7 @@ public:
bool is_match_case() const;
bool is_whole_words() const;
String get_folder() const;
- RBSet<String> get_filter() const;
+ HashSet<String> get_filter() const;
protected:
void _notification(int p_what);
diff --git a/editor/import/collada.cpp b/editor/import/collada.cpp
index 71b5ddc216..f4d19fe8b6 100644
--- a/editor/import/collada.cpp
+++ b/editor/import/collada.cpp
@@ -2029,7 +2029,7 @@ void Collada::_merge_skeletons(VisualScene *p_vscene, Node *p_node) {
NodeGeometry *gnode = static_cast<NodeGeometry *>(p_node);
if (gnode->controller) {
// recount skeletons used
- RBSet<NodeSkeleton *> skeletons;
+ HashSet<NodeSkeleton *> skeletons;
for (int i = 0; i < gnode->skeletons.size(); i++) {
String nodeid = gnode->skeletons[i];
@@ -2049,11 +2049,11 @@ void Collada::_merge_skeletons(VisualScene *p_vscene, Node *p_node) {
if (skeletons.size() > 1) {
//do the merger!!
- RBSet<NodeSkeleton *>::Element *E = skeletons.front();
- NodeSkeleton *base = E->get();
+ HashSet<NodeSkeleton *>::Iterator E = skeletons.begin();
+ NodeSkeleton *base = *E;
- for (E = E->next(); E; E = E->next()) {
- NodeSkeleton *merged = E->get();
+ for (++E; E; ++E) {
+ NodeSkeleton *merged = *E;
_remove_node(p_vscene, merged);
for (int i = 0; i < merged->children.size(); i++) {
_joint_set_owner(merged->children[i], base);
diff --git a/editor/import/collada.h b/editor/import/collada.h
index 6ac6181769..f1d9c5593f 100644
--- a/editor/import/collada.h
+++ b/editor/import/collada.h
@@ -493,7 +493,7 @@ public:
HashMap<String, VisualScene> visual_scene_map;
HashMap<String, Node *> scene_map;
- RBSet<String> idref_joints;
+ HashSet<String> idref_joints;
HashMap<String, String> sid_to_node_map;
//RBMap<String,NodeJoint*> bone_map;
diff --git a/editor/import/dynamic_font_import_settings.h b/editor/import/dynamic_font_import_settings.h
index 4e2135a13c..154f347b77 100644
--- a/editor/import/dynamic_font_import_settings.h
+++ b/editor/import/dynamic_font_import_settings.h
@@ -33,6 +33,7 @@
#include "editor/import/resource_importer_dynamic_font.h"
+#include "core/templates/rb_set.h"
#include "scene/gui/dialogs.h"
#include "scene/gui/item_list.h"
#include "scene/gui/option_button.h"
diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp
index 03fda0a1c3..8d44329022 100644
--- a/editor/import/editor_import_collada.cpp
+++ b/editor/import/editor_import_collada.cpp
@@ -76,12 +76,12 @@ struct ColladaImport {
HashMap<Skeleton3D *, HashMap<String, int>> skeleton_bone_map;
- RBSet<String> valid_animated_nodes;
+ HashSet<String> valid_animated_nodes;
Vector<int> valid_animated_properties;
HashMap<String, bool> bones_with_animation;
- RBSet<String> mesh_unique_names;
- RBSet<String> material_unique_names;
+ HashSet<String> mesh_unique_names;
+ HashSet<String> material_unique_names;
Error _populate_skeleton(Skeleton3D *p_skeleton, Collada::Node *p_node, int &r_bone, int p_parent);
Error _create_scene_skeletons(Collada::Node *p_node);
@@ -94,7 +94,7 @@ struct ColladaImport {
void create_animation(int p_clip, bool p_import_value_tracks);
void create_animations(bool p_import_value_tracks);
- RBSet<String> tracks_in_clips;
+ HashSet<String> tracks_in_clips;
Vector<String> missing_textures;
void _pre_process_lights(Collada::Node *p_node);
@@ -875,7 +875,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ImporterMesh> &p
Vector<Collada::Vertex> vertex_array; //there we go, vertex array
vertex_array.resize(vertex_set.size());
- for (Collada::Vertex &F : vertex_set) {
+ for (const Collada::Vertex &F : vertex_set) {
vertex_array.write[F.idx] = F;
}
@@ -1452,7 +1452,7 @@ void ColladaImport::create_animation(int p_clip, bool p_import_value_tracks) {
//main anim
}
- RBSet<int> track_filter;
+ HashSet<int> track_filter;
if (p_clip == -1) {
for (int i = 0; i < collada.state.animation_clips.size(); i++) {
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index 4f666730d5..80230bc316 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -704,7 +704,7 @@ Node *ResourceImporterScene::_pre_fix_node(Node *p_node, Node *p_root, HashMap<R
return p_node;
}
-Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Pair<PackedVector3Array, PackedInt32Array> &r_occluder_arrays, RBSet<Ref<ImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps) {
+Node *ResourceImporterScene::_post_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Pair<PackedVector3Array, PackedInt32Array> &r_occluder_arrays, HashSet<Ref<ImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps) {
// children first
for (int i = 0; i < p_node->get_child_count(); i++) {
Node *r = _post_fix_node(p_node->get_child(i), p_root, collision_map, r_occluder_arrays, r_scanned_meshes, p_node_data, p_material_data, p_animation_data, p_animation_fps);
@@ -1994,7 +1994,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
animation_data = subresources["animations"];
}
- RBSet<Ref<ImporterMesh>> scanned_meshes;
+ HashSet<Ref<ImporterMesh>> scanned_meshes;
HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> collision_map;
Pair<PackedVector3Array, PackedInt32Array> occluder_arrays;
List<Pair<NodePath, Node *>> node_renames;
diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h
index 92bd267216..16cf3d651d 100644
--- a/editor/import/resource_importer_scene.h
+++ b/editor/import/resource_importer_scene.h
@@ -272,7 +272,7 @@ public:
virtual int get_import_order() const override { return ResourceImporter::IMPORT_ORDER_SCENE; }
Node *_pre_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &r_collision_map, Pair<PackedVector3Array, PackedInt32Array> *r_occluder_arrays, List<Pair<NodePath, Node *>> &r_node_renames);
- Node *_post_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Pair<PackedVector3Array, PackedInt32Array> &r_occluder_arrays, RBSet<Ref<ImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps);
+ Node *_post_fix_node(Node *p_node, Node *p_root, HashMap<Ref<ImporterMesh>, Vector<Ref<Shape3D>>> &collision_map, Pair<PackedVector3Array, PackedInt32Array> &r_occluder_arrays, HashSet<Ref<ImporterMesh>> &r_scanned_meshes, const Dictionary &p_node_data, const Dictionary &p_material_data, const Dictionary &p_animation_data, float p_animation_fps);
Ref<Animation> _save_animation_to_file(Ref<Animation> anim, bool p_save_to_file, String p_save_to_path, bool p_keep_custom_tracks);
void _create_clips(AnimationPlayer *anim, const Array &p_clips, bool p_bake_all);
diff --git a/editor/import/scene_import_settings.h b/editor/import/scene_import_settings.h
index cbd105045a..a4008582ce 100644
--- a/editor/import/scene_import_settings.h
+++ b/editor/import/scene_import_settings.h
@@ -139,8 +139,8 @@ class SceneImportSettings : public ConfirmationDialog {
void _fill_animation(Tree *p_tree, const Ref<Animation> &p_anim, const String &p_name, TreeItem *p_parent);
void _fill_scene(Node *p_node, TreeItem *p_parent_item);
- RBSet<Ref<Mesh>> mesh_set;
- RBSet<Ref<Material>> material_set;
+ HashSet<Ref<Mesh>> mesh_set;
+ HashSet<Ref<Material>> material_set;
String selected_type;
String selected_id;
diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp
index 56b15c3b1a..9eb2706d8a 100644
--- a/editor/import_dock.cpp
+++ b/editor/import_dock.cpp
@@ -43,7 +43,7 @@ public:
List<PropertyInfo> properties;
Ref<ResourceImporter> importer;
Vector<String> paths;
- RBSet<StringName> checked;
+ HashSet<StringName> checked;
bool checking;
String base_options_path;
@@ -194,7 +194,7 @@ void ImportDock::set_edit_multiple_paths(const Vector<String> &p_paths) {
// Use the value that is repeated the most.
HashMap<String, Dictionary> value_frequency;
- RBSet<String> extensions;
+ HashSet<String> extensions;
for (int i = 0; i < p_paths.size(); i++) {
Ref<ConfigFile> config;
diff --git a/editor/inspector_dock.cpp b/editor/inspector_dock.cpp
index c5dacd8d21..934d3a82b4 100644
--- a/editor/inspector_dock.cpp
+++ b/editor/inspector_dock.cpp
@@ -307,7 +307,7 @@ void InspectorDock::_prepare_history() {
history_menu->get_popup()->clear();
Ref<Texture2D> base_icon = get_theme_icon(SNAME("Object"), SNAME("EditorIcons"));
- RBSet<ObjectID> already;
+ HashSet<ObjectID> already;
for (int i = editor_history->get_history_len() - 1; i >= history_to; i--) {
ObjectID id = editor_history->get_history_obj(i);
Object *obj = ObjectDB::get_instance(id);
diff --git a/editor/plugins/animation_blend_tree_editor_plugin.cpp b/editor/plugins/animation_blend_tree_editor_plugin.cpp
index 715b1725e0..8c8505283c 100644
--- a/editor/plugins/animation_blend_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_blend_tree_editor_plugin.cpp
@@ -563,7 +563,7 @@ bool AnimationNodeBlendTreeEditor::_update_filters(const Ref<AnimationNode> &ano
updating = true;
- RBSet<String> paths;
+ HashSet<String> paths;
HashMap<String, RBSet<String>> types;
{
List<StringName> animations;
@@ -698,11 +698,12 @@ bool AnimationNodeBlendTreeEditor::_update_filters(const Ref<AnimationNode> &ano
//just a node, not a property track
String types_text = "[";
if (types.has(path)) {
- RBSet<String>::Element *F = types[path].front();
- types_text += F->get();
- while (F->next()) {
- F = F->next();
- types_text += " / " + F->get();
+ RBSet<String>::Iterator F = types[path].begin();
+ types_text += *F;
+ while (F) {
+ types_text += " / " + *F;
+ ;
+ ++F;
}
}
types_text += "]";
diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp
index 2b90b4cdd6..bd9b89cbb7 100644
--- a/editor/plugins/animation_state_machine_editor.cpp
+++ b/editor/plugins/animation_state_machine_editor.cpp
@@ -494,7 +494,7 @@ Control::CursorShape AnimationNodeStateMachineEditor::get_cursor_shape(const Poi
void AnimationNodeStateMachineEditor::_group_selected_nodes() {
if (!selected_nodes.is_empty()) {
- if (selected_nodes.size() == 1 && (selected_nodes.front()->get() == state_machine->start_node || selected_nodes.front()->get() == state_machine->end_node))
+ if (selected_nodes.size() == 1 && (*selected_nodes.begin() == state_machine->start_node || *selected_nodes.begin() == state_machine->end_node))
return;
Ref<AnimationNodeStateMachine> group_sm = memnew(AnimationNodeStateMachine);
@@ -609,7 +609,7 @@ void AnimationNodeStateMachineEditor::_group_selected_nodes() {
void AnimationNodeStateMachineEditor::_ungroup_selected_nodes() {
bool find = false;
- RBSet<StringName> new_selected_nodes;
+ HashSet<StringName> new_selected_nodes;
for (const StringName &E : selected_nodes) {
Ref<AnimationNodeStateMachine> group_sm = state_machine->get_node(E);
@@ -1846,7 +1846,7 @@ void AnimationNodeStateMachineEditor::_update_mode() {
if (tool_select->is_pressed()) {
tool_erase_hb->show();
bool nothing_selected = selected_nodes.is_empty() && selected_transition_from == StringName() && selected_transition_to == StringName();
- bool start_end_selected = selected_nodes.size() == 1 && (selected_nodes.front()->get() == state_machine->start_node || selected_nodes.front()->get() == state_machine->end_node);
+ bool start_end_selected = selected_nodes.size() == 1 && (*selected_nodes.begin() == state_machine->start_node || *selected_nodes.begin() == state_machine->end_node);
tool_erase->set_disabled(nothing_selected || start_end_selected);
if (selected_nodes.is_empty() || start_end_selected) {
@@ -1854,7 +1854,7 @@ void AnimationNodeStateMachineEditor::_update_mode() {
tool_group->set_visible(true);
tool_ungroup->set_visible(false);
} else {
- Ref<AnimationNodeStateMachine> ansm = state_machine->get_node(selected_nodes.front()->get());
+ Ref<AnimationNodeStateMachine> ansm = state_machine->get_node(*selected_nodes.begin());
if (selected_nodes.size() == 1 && ansm.is_valid()) {
tool_group->set_disabled(true);
diff --git a/editor/plugins/animation_state_machine_editor.h b/editor/plugins/animation_state_machine_editor.h
index 3db4d91367..ea16abd64c 100644
--- a/editor/plugins/animation_state_machine_editor.h
+++ b/editor/plugins/animation_state_machine_editor.h
@@ -64,7 +64,7 @@ class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin {
PanelContainer *panel = nullptr;
StringName selected_node;
- RBSet<StringName> selected_nodes;
+ HashSet<StringName> selected_nodes;
HScrollBar *h_scroll = nullptr;
VScrollBar *v_scroll = nullptr;
@@ -105,7 +105,7 @@ class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin {
Point2 box_selecting_from;
Point2 box_selecting_to;
Rect2 box_selecting_rect;
- RBSet<StringName> previous_selected;
+ HashSet<StringName> previous_selected;
bool dragging_selected_attempt = false;
bool dragging_selected = false;
diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp
index 0560365a58..bb0cfcba25 100644
--- a/editor/plugins/editor_preview_plugins.cpp
+++ b/editor/plugins/editor_preview_plugins.cpp
@@ -481,8 +481,8 @@ Ref<Texture2D> EditorScriptPreviewPlugin::generate(const Ref<Resource> &p_from,
List<String> kwors;
scr->get_language()->get_reserved_words(&kwors);
- RBSet<String> control_flow_keywords;
- RBSet<String> keywords;
+ HashSet<String> control_flow_keywords;
+ HashSet<String> keywords;
for (const String &E : kwors) {
if (scr->get_language()->is_control_flow_keyword(E)) {
diff --git a/editor/plugins/gdextension_export_plugin.h b/editor/plugins/gdextension_export_plugin.h
index 28c37fed52..c17e02e1fd 100644
--- a/editor/plugins/gdextension_export_plugin.h
+++ b/editor/plugins/gdextension_export_plugin.h
@@ -35,10 +35,10 @@
class GDExtensionExportPlugin : public EditorExportPlugin {
protected:
- virtual void _export_file(const String &p_path, const String &p_type, const RBSet<String> &p_features);
+ virtual void _export_file(const String &p_path, const String &p_type, const HashSet<String> &p_features);
};
-void GDExtensionExportPlugin::_export_file(const String &p_path, const String &p_type, const RBSet<String> &p_features) {
+void GDExtensionExportPlugin::_export_file(const String &p_path, const String &p_type, const HashSet<String> &p_features) {
if (p_type != "NativeExtension") {
return;
}
diff --git a/editor/plugins/mesh_instance_3d_editor_plugin.cpp b/editor/plugins/mesh_instance_3d_editor_plugin.cpp
index 3094e24659..d85087b5ea 100644
--- a/editor/plugins/mesh_instance_3d_editor_plugin.cpp
+++ b/editor/plugins/mesh_instance_3d_editor_plugin.cpp
@@ -349,12 +349,13 @@ struct MeshInstance3DEditorEdgeSort {
Vector2 a;
Vector2 b;
- bool operator<(const MeshInstance3DEditorEdgeSort &p_b) const {
- if (a == p_b.a) {
- return b < p_b.b;
- } else {
- return a < p_b.a;
- }
+ static uint32_t hash(const MeshInstance3DEditorEdgeSort &p_edge) {
+ uint32_t h = hash_djb2_one_32(HashMapHasherDefault::hash(p_edge.a));
+ return hash_djb2_one_32(HashMapHasherDefault::hash(p_edge.b), h);
+ }
+
+ bool operator==(const MeshInstance3DEditorEdgeSort &p_b) const {
+ return a == p_b.a && b == p_b.b;
}
MeshInstance3DEditorEdgeSort() {}
@@ -373,7 +374,7 @@ void MeshInstance3DEditor::_create_uv_lines(int p_layer) {
Ref<Mesh> mesh = node->get_mesh();
ERR_FAIL_COND(!mesh.is_valid());
- RBSet<MeshInstance3DEditorEdgeSort> edges;
+ HashSet<MeshInstance3DEditorEdgeSort, MeshInstance3DEditorEdgeSort> edges;
uv_lines.clear();
for (int i = 0; i < mesh->get_surface_count(); i++) {
if (mesh->surface_get_primitive_type(i) != Mesh::PRIMITIVE_TRIANGLES) {
diff --git a/editor/plugins/node_3d_editor_gizmos.cpp b/editor/plugins/node_3d_editor_gizmos.cpp
index 58cdf3533c..37922dd5c9 100644
--- a/editor/plugins/node_3d_editor_gizmos.cpp
+++ b/editor/plugins/node_3d_editor_gizmos.cpp
@@ -3799,7 +3799,7 @@ void LightmapGIGizmoPlugin::redraw(EditorNode3DGizmo *p_gizmo) {
p_gizmo->clear();
Vector<Vector3> lines;
- RBSet<Vector2i> lines_found;
+ HashSet<Vector2i> lines_found;
Vector<Vector3> points = data->get_capture_points();
if (points.size() == 0) {
diff --git a/editor/plugins/node_3d_editor_plugin.cpp b/editor/plugins/node_3d_editor_plugin.cpp
index e7b4bac8ab..cbdb1e520a 100644
--- a/editor/plugins/node_3d_editor_plugin.cpp
+++ b/editor/plugins/node_3d_editor_plugin.cpp
@@ -518,7 +518,7 @@ ObjectID Node3DEditorViewport::_select_ray(const Point2 &p_pos) {
}
Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_ray(pos, pos + ray * camera->get_far(), get_tree()->get_root()->get_world_3d()->get_scenario());
- RBSet<Ref<EditorNode3DGizmo>> found_gizmos;
+ HashSet<Ref<EditorNode3DGizmo>> found_gizmos;
Node *edited_scene = get_tree()->get_edited_scene_root();
ObjectID closest;
@@ -581,7 +581,7 @@ void Node3DEditorViewport::_find_items_at_pos(const Point2 &p_pos, Vector<_RayRe
Vector3 pos = _get_ray_pos(p_pos);
Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_ray(pos, pos + ray * camera->get_far(), get_tree()->get_root()->get_world_3d()->get_scenario());
- RBSet<Node3D *> found_nodes;
+ HashSet<Node3D *> found_nodes;
for (int i = 0; i < instances.size(); i++) {
Node3D *spat = Object::cast_to<Node3D>(ObjectDB::get_instance(instances[i]));
@@ -764,7 +764,7 @@ void Node3DEditorViewport::_select_region() {
}
Vector<ObjectID> instances = RenderingServer::get_singleton()->instances_cull_convex(frustum, get_tree()->get_root()->get_world_3d()->get_scenario());
- RBSet<Node3D *> found_nodes;
+ HashSet<Node3D *> found_nodes;
Vector<Node *> selected;
Node *edited_scene = get_tree()->get_edited_scene_root();
@@ -6685,8 +6685,8 @@ void Node3DEditor::_refresh_menu_icons() {
}
template <typename T>
-RBSet<T *> _get_child_nodes(Node *parent_node) {
- RBSet<T *> nodes = RBSet<T *>();
+HashSet<T *> _get_child_nodes(Node *parent_node) {
+ HashSet<T *> nodes = HashSet<T *>();
T *node = Node::cast_to<T>(parent_node);
if (node) {
nodes.insert(node);
@@ -6694,22 +6694,22 @@ RBSet<T *> _get_child_nodes(Node *parent_node) {
for (int i = 0; i < parent_node->get_child_count(); i++) {
Node *child_node = parent_node->get_child(i);
- RBSet<T *> child_nodes = _get_child_nodes<T>(child_node);
- for (typename RBSet<T *>::Element *I = child_nodes.front(); I; I = I->next()) {
- nodes.insert(I->get());
+ HashSet<T *> child_nodes = _get_child_nodes<T>(child_node);
+ for (T *I : child_nodes) {
+ nodes.insert(I);
}
}
return nodes;
}
-RBSet<RID> _get_physics_bodies_rid(Node *node) {
- RBSet<RID> rids = RBSet<RID>();
+HashSet<RID> _get_physics_bodies_rid(Node *node) {
+ HashSet<RID> rids = HashSet<RID>();
PhysicsBody3D *pb = Node::cast_to<PhysicsBody3D>(node);
if (pb) {
rids.insert(pb->get_rid());
}
- RBSet<PhysicsBody3D *> child_nodes = _get_child_nodes<PhysicsBody3D>(node);
+ HashSet<PhysicsBody3D *> child_nodes = _get_child_nodes<PhysicsBody3D>(node);
for (const PhysicsBody3D *I : child_nodes) {
rids.insert(I->get_rid());
}
@@ -6728,20 +6728,21 @@ void Node3DEditor::snap_selected_nodes_to_floor() {
Vector3 position_offset = Vector3();
// Priorities for snapping to floor are CollisionShapes, VisualInstances and then origin
- RBSet<VisualInstance3D *> vi = _get_child_nodes<VisualInstance3D>(sp);
- RBSet<CollisionShape3D *> cs = _get_child_nodes<CollisionShape3D>(sp);
+ HashSet<VisualInstance3D *> vi = _get_child_nodes<VisualInstance3D>(sp);
+ HashSet<CollisionShape3D *> cs = _get_child_nodes<CollisionShape3D>(sp);
bool found_valid_shape = false;
if (cs.size()) {
AABB aabb;
- RBSet<CollisionShape3D *>::Element *I = cs.front();
- if (I->get()->get_shape().is_valid()) {
- CollisionShape3D *collision_shape = cs.front()->get();
+ HashSet<CollisionShape3D *>::Iterator I = cs.begin();
+ if ((*I)->get_shape().is_valid()) {
+ CollisionShape3D *collision_shape = *cs.begin();
aabb = collision_shape->get_global_transform().xform(collision_shape->get_shape()->get_debug_mesh()->get_aabb());
found_valid_shape = true;
}
- for (I = I->next(); I; I = I->next()) {
- CollisionShape3D *col_shape = I->get();
+
+ for (++I; I; ++I) {
+ CollisionShape3D *col_shape = *I;
if (col_shape->get_shape().is_valid()) {
aabb.merge_with(col_shape->get_global_transform().xform(col_shape->get_shape()->get_debug_mesh()->get_aabb()));
found_valid_shape = true;
@@ -6754,7 +6755,7 @@ void Node3DEditor::snap_selected_nodes_to_floor() {
}
}
if (!found_valid_shape && vi.size()) {
- AABB aabb = vi.front()->get()->get_transformed_aabb();
+ AABB aabb = (*vi.begin())->get_transformed_aabb();
for (const VisualInstance3D *I : vi) {
aabb.merge_with(I->get_transformed_aabb());
}
@@ -6798,7 +6799,7 @@ void Node3DEditor::snap_selected_nodes_to_floor() {
Dictionary d = snap_data[node];
Vector3 from = d["from"];
Vector3 to = from - Vector3(0.0, max_snap_height, 0.0);
- RBSet<RID> excluded = _get_physics_bodies_rid(sp);
+ HashSet<RID> excluded = _get_physics_bodies_rid(sp);
PhysicsDirectSpaceState3D::RayParameters ray_params;
ray_params.from = from;
@@ -6820,7 +6821,7 @@ void Node3DEditor::snap_selected_nodes_to_floor() {
Dictionary d = snap_data[node];
Vector3 from = d["from"];
Vector3 to = from - Vector3(0.0, max_snap_height, 0.0);
- RBSet<RID> excluded = _get_physics_bodies_rid(sp);
+ HashSet<RID> excluded = _get_physics_bodies_rid(sp);
PhysicsDirectSpaceState3D::RayParameters ray_params;
ray_params.from = from;
diff --git a/editor/plugins/packed_scene_translation_parser_plugin.h b/editor/plugins/packed_scene_translation_parser_plugin.h
index 9135498333..1bfb500933 100644
--- a/editor/plugins/packed_scene_translation_parser_plugin.h
+++ b/editor/plugins/packed_scene_translation_parser_plugin.h
@@ -37,7 +37,7 @@ class PackedSceneEditorTranslationParserPlugin : public EditorTranslationParserP
GDCLASS(PackedSceneEditorTranslationParserPlugin, EditorTranslationParserPlugin);
// Scene Node's properties that contain translation strings.
- RBSet<String> lookup_properties;
+ HashSet<String> lookup_properties;
// Properties from specific Nodes that should be ignored.
HashMap<String, Vector<String>> exception_list;
diff --git a/editor/plugins/root_motion_editor_plugin.cpp b/editor/plugins/root_motion_editor_plugin.cpp
index bebc0e9d54..681dd476e3 100644
--- a/editor/plugins/root_motion_editor_plugin.cpp
+++ b/editor/plugins/root_motion_editor_plugin.cpp
@@ -65,7 +65,7 @@ void EditorPropertyRootMotion::_node_assign() {
return;
}
- RBSet<String> paths;
+ HashSet<String> paths;
{
List<StringName> animations;
player->get_animation_list(&animations);
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index 115c6f43dd..99b810be44 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -1715,7 +1715,7 @@ void ScriptEditor::notify_script_changed(const Ref<Script> &p_script) {
}
void ScriptEditor::get_breakpoints(List<String> *p_breakpoints) {
- RBSet<String> loaded_scripts;
+ HashSet<String> loaded_scripts;
for (int i = 0; i < tab_container->get_tab_count(); i++) {
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_tab_control(i));
if (!se) {
@@ -1800,7 +1800,7 @@ void ScriptEditor::ensure_select_current() {
_update_selected_editor_menu();
}
-void ScriptEditor::_find_scripts(Node *p_base, Node *p_current, RBSet<Ref<Script>> &used) {
+void ScriptEditor::_find_scripts(Node *p_base, Node *p_current, HashSet<Ref<Script>> &used) {
if (p_current != p_base && p_current->get_owner() != p_base) {
return;
}
@@ -1980,7 +1980,7 @@ void ScriptEditor::_update_script_names() {
return;
}
- RBSet<Ref<Script>> used;
+ HashSet<Ref<Script>> used;
Node *edited = EditorNode::get_singleton()->get_edited_scene();
if (edited) {
_find_scripts(edited, edited, used);
@@ -3143,7 +3143,7 @@ void ScriptEditor::set_window_layout(Ref<ConfigFile> p_layout) {
restoring_layout = true;
- RBSet<String> loaded_scripts;
+ HashSet<String> loaded_scripts;
List<String> extensions;
ResourceLoader::get_recognized_extensions_for_type("Script", &extensions);
diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h
index ff71c8b484..9f088aac49 100644
--- a/editor/plugins/script_editor_plugin.h
+++ b/editor/plugins/script_editor_plugin.h
@@ -414,7 +414,7 @@ class ScriptEditor : public PanelContainer {
void _update_help_overview();
void _help_overview_selected(int p_idx);
- void _find_scripts(Node *p_base, Node *p_current, RBSet<Ref<Script>> &used);
+ void _find_scripts(Node *p_base, Node *p_current, HashSet<Ref<Script>> &used);
void _tree_changed();
@@ -454,7 +454,7 @@ class ScriptEditor : public PanelContainer {
Ref<Script> _get_current_script();
Array _get_open_scripts() const;
- RBSet<String> textfile_extensions;
+ HashSet<String> textfile_extensions;
Ref<TextFile> _load_text_file(const String &p_path, Error *r_error) const;
Error _save_text_file(Ref<TextFile> p_text_file, const String &p_path);
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index f666ac0649..a4bccf30e3 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -664,7 +664,7 @@ static Node *_find_node_for_script(Node *p_base, Node *p_current, const Ref<Scri
return nullptr;
}
-static void _find_changed_scripts_for_external_editor(Node *p_base, Node *p_current, RBSet<Ref<Script>> &r_scripts) {
+static void _find_changed_scripts_for_external_editor(Node *p_base, Node *p_current, HashSet<Ref<Script>> &r_scripts) {
if (p_current->get_owner() != p_base && p_base != p_current) {
return;
}
@@ -686,7 +686,7 @@ void ScriptEditor::_update_modified_scripts_for_external_editor(Ref<Script> p_fo
ERR_FAIL_COND(!get_tree());
- RBSet<Ref<Script>> scripts;
+ HashSet<Ref<Script>> scripts;
Node *base = get_tree()->get_edited_scene_root();
if (base) {
@@ -970,7 +970,7 @@ void ScriptTextEditor::_update_connected_methods() {
}
Vector<Node *> nodes = _find_all_node_for_script(base, base, script);
- RBSet<StringName> methods_found;
+ HashSet<StringName> methods_found;
for (int i = 0; i < nodes.size(); i++) {
List<Connection> connections;
nodes[i]->get_signals_connected_to_this(&connections);
diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h
index ff13b38832..fc87c84a2c 100644
--- a/editor/plugins/script_text_editor.h
+++ b/editor/plugins/script_text_editor.h
@@ -64,7 +64,7 @@ class ScriptTextEditor : public ScriptEditorBase {
Vector<String> functions;
List<ScriptLanguage::Warning> warnings;
List<ScriptLanguage::ScriptError> errors;
- RBSet<int> safe_lines;
+ HashSet<int> safe_lines;
List<Connection> missing_connections;
diff --git a/editor/plugins/sprite_frames_editor_plugin.h b/editor/plugins/sprite_frames_editor_plugin.h
index 6f16ff2bd1..f7985aba18 100644
--- a/editor/plugins/sprite_frames_editor_plugin.h
+++ b/editor/plugins/sprite_frames_editor_plugin.h
@@ -103,8 +103,8 @@ class SpriteFramesEditor : public HSplitContainer {
Button *split_sheet_zoom_reset = nullptr;
Button *split_sheet_zoom_in = nullptr;
EditorFileDialog *file_split_sheet = nullptr;
- RBSet<int> frames_selected;
- RBSet<int> frames_toggled_by_mouse_hover;
+ HashSet<int> frames_selected;
+ HashSet<int> frames_toggled_by_mouse_hover;
int last_frame_selected = 0;
float scale_ratio;
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index 0595357926..f8797ded66 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -1670,7 +1670,7 @@ void VisualShaderEditor::_update_uniforms(bool p_update_refs) {
}
}
-void VisualShaderEditor::_update_uniform_refs(RBSet<String> &p_deleted_names) {
+void VisualShaderEditor::_update_uniform_refs(HashSet<String> &p_deleted_names) {
for (int i = 0; i < VisualShader::TYPE_MAX; i++) {
VisualShader::Type type = VisualShader::Type(i);
@@ -2288,7 +2288,7 @@ void VisualShaderEditor::_uniform_line_edit_changed(const String &p_text, int p_
undo_redo->add_do_method(this, "_update_uniforms", true);
undo_redo->add_undo_method(this, "_update_uniforms", true);
- RBSet<String> changed_names;
+ HashSet<String> changed_names;
changed_names.insert(node->get_uniform_name());
_update_uniform_refs(changed_names);
@@ -3108,7 +3108,7 @@ void VisualShaderEditor::_delete_nodes(int p_type, const List<int> &p_nodes) {
}
}
- RBSet<String> uniform_names;
+ HashSet<String> uniform_names;
for (const int &F : p_nodes) {
Ref<VisualShaderNode> node = visual_shader->get_node(type, F);
@@ -3212,8 +3212,8 @@ void VisualShaderEditor::_convert_constants_to_uniforms(bool p_vice_versa) {
undo_redo->create_action(TTR("Convert Uniform Node(s) To Constant(s)"));
}
- const RBSet<int> &current_set = p_vice_versa ? selected_uniforms : selected_constants;
- RBSet<String> deleted_names;
+ const HashSet<int> &current_set = p_vice_versa ? selected_uniforms : selected_constants;
+ HashSet<String> deleted_names;
for (const int &E : current_set) {
int node_id = E;
@@ -3789,7 +3789,7 @@ void VisualShaderEditor::_dup_copy_nodes(int p_type, List<CopyItem> &r_items, Li
selection_center.x = 0.0f;
selection_center.y = 0.0f;
- RBSet<int> nodes;
+ HashSet<int> nodes;
for (int i = 0; i < graph->get_child_count(); i++) {
GraphNode *gn = Object::cast_to<GraphNode>(graph->get_child(i));
@@ -3869,8 +3869,8 @@ void VisualShaderEditor::_dup_paste_nodes(int p_type, List<CopyItem> &r_items, c
int base_id = visual_shader->get_valid_node_id(type);
int id_from = base_id;
HashMap<int, int> connection_remap;
- RBSet<int> unsupported_set;
- RBSet<int> added_set;
+ HashSet<int> unsupported_set;
+ HashSet<int> added_set;
for (CopyItem &item : r_items) {
if (item.disabled) {
diff --git a/editor/plugins/visual_shader_editor_plugin.h b/editor/plugins/visual_shader_editor_plugin.h
index 003c8b15a8..1b56892ebf 100644
--- a/editor/plugins/visual_shader_editor_plugin.h
+++ b/editor/plugins/visual_shader_editor_plugin.h
@@ -358,8 +358,8 @@ class VisualShaderEditor : public VBoxContainer {
int from_node = -1;
int from_slot = -1;
- RBSet<int> selected_constants;
- RBSet<int> selected_uniforms;
+ HashSet<int> selected_constants;
+ HashSet<int> selected_uniforms;
int selected_comment = -1;
int selected_float_constant = -1;
@@ -468,7 +468,7 @@ class VisualShaderEditor : public VBoxContainer {
bool _is_available(int p_mode);
void _update_created_node(GraphNode *node);
void _update_uniforms(bool p_update_refs);
- void _update_uniform_refs(RBSet<String> &p_names);
+ void _update_uniform_refs(HashSet<String> &p_names);
void _update_varyings();
void _visibility_changed();
diff --git a/editor/pot_generator.cpp b/editor/pot_generator.cpp
index bfc58db2ad..a00df0ef40 100644
--- a/editor/pot_generator.cpp
+++ b/editor/pot_generator.cpp
@@ -127,7 +127,7 @@ void POTGenerator::_write_to_pot(const String &p_file) {
for (int i = 0; i < v_msgid_data.size(); i++) {
String context = v_msgid_data[i].ctx;
String plural = v_msgid_data[i].plural;
- const RBSet<String> &locations = v_msgid_data[i].locations;
+ const HashSet<String> &locations = v_msgid_data[i].locations;
// Put the blank line at the start, to avoid a double at the end when closing the file.
file->store_line("");
diff --git a/editor/pot_generator.h b/editor/pot_generator.h
index b24eadfd95..7b14eb027e 100644
--- a/editor/pot_generator.h
+++ b/editor/pot_generator.h
@@ -33,7 +33,7 @@
#include "core/io/file_access.h"
#include "core/templates/hash_map.h"
-#include "core/templates/rb_set.h"
+#include "core/templates/hash_set.h"
//#define DEBUG_POT
@@ -43,7 +43,7 @@ class POTGenerator {
struct MsgidData {
String ctx;
String plural;
- RBSet<String> locations;
+ HashSet<String> locations;
};
// Store msgid as key and the additional data around the msgid - if it's under a context, has plurals and its file locations.
HashMap<String, Vector<MsgidData>> all_translation_strings;
diff --git a/editor/project_export.cpp b/editor/project_export.cpp
index 839378dad2..503eb5000b 100644
--- a/editor/project_export.cpp
+++ b/editor/project_export.cpp
@@ -366,10 +366,13 @@ void ProjectExportDialog::_update_feature_list() {
}
custom_feature_display->clear();
- for (RBSet<String>::Element *E = fset.front(); E; E = E->next()) {
- String f = E->get();
- if (E->next()) {
+ bool first = true;
+ for (const String &E : fset) {
+ String f = E;
+ if (!first) {
f += ", ";
+ } else {
+ first = false;
}
custom_feature_display->add_text(f);
}
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 2eb0a3a76a..379c3bbb01 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -1064,7 +1064,7 @@ public:
void select_first_visible_project();
void erase_selected_projects(bool p_delete_project_contents);
Vector<Item> get_selected_projects() const;
- const RBSet<String> &get_selected_project_keys() const;
+ const HashSet<String> &get_selected_project_keys() const;
void ensure_project_visible(int p_index);
int get_single_selected_index() const;
bool is_any_project_missing() const;
@@ -1090,7 +1090,7 @@ private:
String _search_term;
FilterOption _order_option;
- RBSet<String> _selected_project_keys;
+ HashSet<String> _selected_project_keys;
String _last_clicked; // Project key
VBoxContainer *_scroll_children;
int _icon_load_index;
@@ -1258,7 +1258,7 @@ void ProjectList::load_projects() {
List<PropertyInfo> properties;
EditorSettings::get_singleton()->get_property_list(&properties);
- RBSet<String> favorites;
+ HashSet<String> favorites;
// Find favourites...
for (const PropertyInfo &E : properties) {
String property_key = E.name;
@@ -1504,7 +1504,7 @@ void ProjectList::sort_projects() {
update_dock_menu();
}
-const RBSet<String> &ProjectList::get_selected_project_keys() const {
+const HashSet<String> &ProjectList::get_selected_project_keys() const {
// Faster if that's all you need
return _selected_project_keys;
}
@@ -1539,7 +1539,7 @@ int ProjectList::get_single_selected_index() const {
String key;
if (_selected_project_keys.size() == 1) {
// Only one selected
- key = _selected_project_keys.front()->get();
+ key = *_selected_project_keys.begin();
} else {
// Multiple selected, consider the last clicked one as "main"
key = _last_clicked;
@@ -2107,7 +2107,7 @@ void ProjectManager::_open_selected_projects() {
// This is especially important for the HTML5 project manager.
loading_label->show();
- const RBSet<String> &selected_list = _project_list->get_selected_project_keys();
+ const HashSet<String> &selected_list = _project_list->get_selected_project_keys();
for (const String &E : selected_list) {
const String &selected = E;
@@ -2156,7 +2156,7 @@ void ProjectManager::_open_selected_projects() {
}
void ProjectManager::_open_selected_projects_ask() {
- const RBSet<String> &selected_list = _project_list->get_selected_project_keys();
+ const HashSet<String> &selected_list = _project_list->get_selected_project_keys();
if (selected_list.size() < 1) {
return;
@@ -2271,7 +2271,7 @@ void ProjectManager::_run_project_confirm() {
}
void ProjectManager::_run_project() {
- const RBSet<String> &selected_list = _project_list->get_selected_project_keys();
+ const HashSet<String> &selected_list = _project_list->get_selected_project_keys();
if (selected_list.size() < 1) {
return;
@@ -2331,7 +2331,7 @@ void ProjectManager::_import_project() {
}
void ProjectManager::_rename_project() {
- const RBSet<String> &selected_list = _project_list->get_selected_project_keys();
+ const HashSet<String> &selected_list = _project_list->get_selected_project_keys();
if (selected_list.size() == 0) {
return;
@@ -2357,7 +2357,7 @@ void ProjectManager::_erase_missing_projects_confirm() {
}
void ProjectManager::_erase_project() {
- const RBSet<String> &selected_list = _project_list->get_selected_project_keys();
+ const HashSet<String> &selected_list = _project_list->get_selected_project_keys();
if (selected_list.size() == 0) {
return;
@@ -2414,7 +2414,7 @@ void ProjectManager::_files_dropped(PackedStringArray p_files) {
_install_project(p_files[0], file.substr(0, file.length() - 4).capitalize());
return;
}
- RBSet<String> folders_set;
+ HashSet<String> folders_set;
Ref<DirAccess> da = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
for (int i = 0; i < p_files.size(); i++) {
String file = p_files[i];
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index 5367306f1a..14a0427e18 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -249,7 +249,7 @@ String ProjectSettingsEditor::_get_setting_name() const {
}
void ProjectSettingsEditor::_add_feature_overrides() {
- RBSet<String> presets;
+ HashSet<String> presets;
presets.insert("bptc");
presets.insert("s3tc");
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index d541b26cc9..da67ed79ba 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -137,7 +137,7 @@ void CustomPropertyEditor::_menu_option(int p_which) {
ResourceLoader::get_recognized_extensions_for_type(type.get_slice(",", i), &extensions);
}
- RBSet<String> valid_extensions;
+ HashSet<String> valid_extensions;
for (const String &E : extensions) {
valid_extensions.insert(E);
}
@@ -875,7 +875,7 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
for (int i = 0; i < hint_text.get_slice_count(","); i++) {
String base = hint_text.get_slice(",", i);
- RBSet<String> valid_inheritors;
+ HashSet<String> valid_inheritors;
valid_inheritors.insert(base);
List<StringName> inheritors;
ClassDB::get_inheriters_from_class(base.strip_edges(), &inheritors);
diff --git a/editor/reparent_dialog.cpp b/editor/reparent_dialog.cpp
index 38d909038f..5a8fe24518 100644
--- a/editor/reparent_dialog.cpp
+++ b/editor/reparent_dialog.cpp
@@ -57,7 +57,7 @@ void ReparentDialog::_reparent() {
}
}
-void ReparentDialog::set_current(const RBSet<Node *> &p_selection) {
+void ReparentDialog::set_current(const HashSet<Node *> &p_selection) {
tree->set_marked(p_selection, false, false);
//tree->set_selected(p_node->get_parent());
}
diff --git a/editor/reparent_dialog.h b/editor/reparent_dialog.h
index a5a9818e7f..49b00661a0 100644
--- a/editor/reparent_dialog.h
+++ b/editor/reparent_dialog.h
@@ -52,7 +52,7 @@ protected:
static void _bind_methods();
public:
- void set_current(const RBSet<Node *> &p_selection);
+ void set_current(const HashSet<Node *> &p_selection);
ReparentDialog();
~ReparentDialog();
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index afb3ac7c15..2387f65229 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -717,7 +717,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
}
List<Node *> nodes = editor_selection->get_selected_node_list();
- RBSet<Node *> nodeset;
+ HashSet<Node *> nodeset;
for (Node *E : nodes) {
nodeset.insert(E);
}
@@ -1528,8 +1528,8 @@ bool SceneTreeDock::_check_node_path_recursive(Node *p_root_node, Variant &r_var
return false;
}
-void SceneTreeDock::perform_node_renames(Node *p_base, HashMap<Node *, NodePath> *p_renames, HashMap<Ref<Animation>, RBSet<int>> *r_rem_anims) {
- HashMap<Ref<Animation>, RBSet<int>> rem_anims;
+void SceneTreeDock::perform_node_renames(Node *p_base, HashMap<Node *, NodePath> *p_renames, HashMap<Ref<Animation>, HashSet<int>> *r_rem_anims) {
+ HashMap<Ref<Animation>, HashSet<int>> rem_anims;
if (!r_rem_anims) {
r_rem_anims = &rem_anims;
}
@@ -1581,14 +1581,14 @@ void SceneTreeDock::perform_node_renames(Node *p_base, HashMap<Node *, NodePath>
for (const StringName &E : anims) {
Ref<Animation> anim = ap->get_animation(E);
if (!r_rem_anims->has(anim)) {
- r_rem_anims->insert(anim, RBSet<int>());
- RBSet<int> &ran = r_rem_anims->find(anim)->value;
+ r_rem_anims->insert(anim, HashSet<int>());
+ HashSet<int> &ran = r_rem_anims->find(anim)->value;
for (int i = 0; i < anim->get_track_count(); i++) {
ran.insert(i);
}
}
- RBSet<int> &ran = r_rem_anims->find(anim)->value;
+ HashSet<int> &ran = r_rem_anims->find(anim)->value;
if (anim.is_null()) {
continue;
@@ -1611,11 +1611,11 @@ void SceneTreeDock::perform_node_renames(Node *p_base, HashMap<Node *, NodePath>
//will be erased
int idx = 0;
- RBSet<int>::Element *EI = ran.front();
+ HashSet<int>::Iterator EI = ran.begin();
ERR_FAIL_COND(!EI); //bug
- while (EI->get() != i) {
+ while (*EI != i) {
idx++;
- EI = EI->next();
+ ++EI;
ERR_FAIL_COND(!EI); //another bug
}
diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h
index 1e58a7a66a..aa64945d81 100644
--- a/editor/scene_tree_dock.h
+++ b/editor/scene_tree_dock.h
@@ -293,7 +293,7 @@ public:
void instantiate_scenes(const Vector<String> &p_files, Node *p_parent = nullptr);
void set_selected(Node *p_node, bool p_emit_selected = false);
void fill_path_renames(Node *p_node, Node *p_new_parent, HashMap<Node *, NodePath> *p_renames);
- void perform_node_renames(Node *p_base, HashMap<Node *, NodePath> *p_renames, HashMap<Ref<Animation>, RBSet<int>> *r_rem_anims = nullptr);
+ void perform_node_renames(Node *p_base, HashMap<Node *, NodePath> *p_renames, HashMap<Ref<Animation>, HashSet<int>> *r_rem_anims = nullptr);
SceneTreeEditor *get_tree_editor() { return scene_tree; }
EditorData *get_editor_data() { return editor_data; }
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index afb42efa76..fbcf9739ca 100644
--- a/editor/scene_tree_editor.cpp
+++ b/editor/scene_tree_editor.cpp
@@ -874,7 +874,7 @@ Node *SceneTreeEditor::get_selected() {
return selected;
}
-void SceneTreeEditor::set_marked(const RBSet<Node *> &p_marked, bool p_selectable, bool p_children_selectable) {
+void SceneTreeEditor::set_marked(const HashSet<Node *> &p_marked, bool p_selectable, bool p_children_selectable) {
if (tree_dirty) {
_update_tree();
}
@@ -885,7 +885,7 @@ void SceneTreeEditor::set_marked(const RBSet<Node *> &p_marked, bool p_selectabl
}
void SceneTreeEditor::set_marked(Node *p_marked, bool p_selectable, bool p_children_selectable) {
- RBSet<Node *> s;
+ HashSet<Node *> s;
if (p_marked) {
s.insert(p_marked);
}
diff --git a/editor/scene_tree_editor.h b/editor/scene_tree_editor.h
index 604d77cf76..1f79b48449 100644
--- a/editor/scene_tree_editor.h
+++ b/editor/scene_tree_editor.h
@@ -99,7 +99,7 @@ class SceneTreeEditor : public Control {
void _renamed();
UndoRedo *undo_redo = nullptr;
- RBSet<Node *> marked;
+ HashSet<Node *> marked;
bool marked_selectable = false;
bool marked_children_selectable = false;
bool display_foreign = false;
@@ -140,7 +140,7 @@ public:
void set_undo_redo(UndoRedo *p_undo_redo) { undo_redo = p_undo_redo; };
void set_display_foreign_nodes(bool p_display);
- void set_marked(const RBSet<Node *> &p_marked, bool p_selectable = false, bool p_children_selectable = true);
+ void set_marked(const HashSet<Node *> &p_marked, bool p_selectable = false, bool p_children_selectable = true);
void set_marked(Node *p_marked, bool p_selectable = false, bool p_children_selectable = true);
void set_selected(Node *p_node, bool p_emit_selected = true);
Node *get_selected();
diff --git a/editor/shader_create_dialog.cpp b/editor/shader_create_dialog.cpp
index 046e8fcdfc..9c322320b8 100644
--- a/editor/shader_create_dialog.cpp
+++ b/editor/shader_create_dialog.cpp
@@ -382,7 +382,7 @@ String ShaderCreateDialog::_validate_path(const String &p_path) {
}
String extension = p.get_extension();
- RBSet<String> extensions;
+ HashSet<String> extensions;
for (int i = 0; i < SHADER_TYPE_MAX; i++) {
for (const String &ext : language_data[i].extensions) {