Skip to content

Commit 3dd9bf1

Browse files
authored
Merge pull request #1842 from dementive/no-std-list
Replace `std::list` and `std::set` with `List` and `HashSet`
2 parents 55a86ba + 50f18d3 commit 3dd9bf1

2 files changed

Lines changed: 7 additions & 7 deletions

File tree

include/godot_cpp/core/class_db.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,17 @@
4545
#include <godot_cpp/variant/callable_method_pointer.hpp>
4646

4747
#include <godot_cpp/templates/a_hash_map.hpp>
48-
#include <list>
48+
#include <godot_cpp/templates/hash_set.hpp>
49+
#include <godot_cpp/templates/list.hpp>
4950
#include <mutex>
50-
#include <set>
5151

5252
namespace godot {
5353

5454
#define DEFVAL(m_defval) (m_defval)
5555

5656
struct MethodDefinition {
5757
StringName name;
58-
std::list<StringName> args;
58+
List<StringName> args;
5959
MethodDefinition() {}
6060
MethodDefinition(StringName p_name) :
6161
name(p_name) {}
@@ -86,10 +86,10 @@ class ClassDB {
8686
StringName parent_name;
8787
GDExtensionInitializationLevel level = GDEXTENSION_INITIALIZATION_SCENE;
8888
AHashMap<StringName, MethodBind *> method_map;
89-
std::set<StringName> signal_names;
89+
HashSet<StringName> signal_names;
9090
AHashMap<StringName, VirtualMethod> virtual_methods;
91-
std::set<StringName> property_names;
92-
std::set<StringName> constant_names;
91+
HashSet<StringName> property_names;
92+
HashSet<StringName> constant_names;
9393
// Pointer to the parent custom class, if any. Will be null if the parent class is a Godot class.
9494
ClassInfo *parent_ptr = nullptr;
9595
};

src/core/class_db.cpp

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

421421
void ClassDB::deinitialize(GDExtensionInitializationLevel p_level) {
422-
std::set<StringName> to_erase;
422+
HashSet<StringName> to_erase;
423423
for (int i = class_register_order.size() - 1; i >= 0; --i) {
424424
const StringName &name = class_register_order[i];
425425
const ClassInfo &cl = classes[name];

0 commit comments

Comments
 (0)