From 2de6da2fa34e1ae17683127fb95dcdee20f386e3 Mon Sep 17 00:00:00 2001 From: dementive <87823030+dementive@users.noreply.github.com> Date: Sat, 4 Oct 2025 15:57:45 -0500 Subject: [PATCH] Use HashSet instead of std::set --- include/godot_cpp/core/class_db.hpp | 8 ++++---- src/core/class_db.cpp | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/godot_cpp/core/class_db.hpp b/include/godot_cpp/core/class_db.hpp index 311109217..d386eebd7 100644 --- a/include/godot_cpp/core/class_db.hpp +++ b/include/godot_cpp/core/class_db.hpp @@ -46,9 +46,9 @@ #include +#include #include #include -#include #include // Needed to use StringName as key in `std::unordered_map` @@ -96,10 +96,10 @@ class ClassDB { StringName parent_name; GDExtensionInitializationLevel level = GDEXTENSION_INITIALIZATION_SCENE; std::unordered_map method_map; - std::set signal_names; + HashSet signal_names; std::unordered_map virtual_methods; - std::set property_names; - std::set constant_names; + HashSet property_names; + HashSet constant_names; // Pointer to the parent custom class, if any. Will be null if the parent class is a Godot class. ClassInfo *parent_ptr = nullptr; }; diff --git a/src/core/class_db.cpp b/src/core/class_db.cpp index 4846281b1..1681894f8 100644 --- a/src/core/class_db.cpp +++ b/src/core/class_db.cpp @@ -410,7 +410,7 @@ void ClassDB::initialize(GDExtensionInitializationLevel p_level) { } void ClassDB::deinitialize(GDExtensionInitializationLevel p_level) { - std::set to_erase; + HashSet to_erase; for (int i = class_register_order.size() - 1; i >= 0; --i) { const StringName &name = class_register_order[i]; const ClassInfo &cl = classes[name];