Skip to content

Commit b792368

Browse files
committed
Replace std::set with HashSet
1 parent 24d79ab commit b792368

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

include/godot_cpp/core/class_db.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@
4444
// Needs to come after method_bind and object have been included.
4545
#include <godot_cpp/variant/callable_method_pointer.hpp>
4646

47+
#include <godot_cpp/templates/hash_set.hpp>
4748
#include <list>
4849
#include <mutex>
49-
#include <set>
5050
#include <string>
5151
#include <unordered_map>
5252
#include <vector>
@@ -96,10 +96,10 @@ class ClassDB {
9696
StringName parent_name;
9797
GDExtensionInitializationLevel level = GDEXTENSION_INITIALIZATION_SCENE;
9898
std::unordered_map<StringName, MethodBind *> method_map;
99-
std::set<StringName> signal_names;
99+
HashSet<StringName> signal_names;
100100
std::unordered_map<StringName, VirtualMethod> virtual_methods;
101-
std::set<StringName> property_names;
102-
std::set<StringName> constant_names;
101+
HashSet<StringName> property_names;
102+
HashSet<StringName> constant_names;
103103
// Pointer to the parent custom class, if any. Will be null if the parent class is a Godot class.
104104
ClassInfo *parent_ptr = nullptr;
105105
};

src/core/class_db.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ void ClassDB::initialize(GDExtensionInitializationLevel p_level) {
412412
}
413413

414414
void ClassDB::deinitialize(GDExtensionInitializationLevel p_level) {
415-
std::set<StringName> to_erase;
415+
HashSet<StringName> to_erase;
416416
for (std::vector<StringName>::reverse_iterator i = class_register_order.rbegin(); i != class_register_order.rend(); ++i) {
417417
const StringName &name = *i;
418418
const ClassInfo &cl = classes[name];

0 commit comments

Comments
 (0)