Skip to content

Commit 67928fe

Browse files
dsnopekdementive
authored andcommitted
Merge pull request #1857 from qqwobble/silenced-warning-call-with-variant
Silenced compiler warning in godot::call_with_variant_args_ret_helper
2 parents 4218f93 + 3eb3069 commit 67928fe

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

include/godot_cpp/core/binder_common.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ void call_with_variant_args_ret_helper(T *p_instance, R (T::*p_method)(P...), co
261261
#else
262262
r_ret = (p_instance->*p_method)(VariantCaster<P>::cast(*p_args[Is])...);
263263
#endif
264+
(void)p_args; // Avoid warning.
264265
}
265266

266267
template <typename T, typename R, typename... P, size_t... Is>
@@ -272,7 +273,7 @@ void call_with_variant_args_retc_helper(T *p_instance, R (T::*p_method)(P...) co
272273
#else
273274
r_ret = (p_instance->*p_method)(VariantCaster<P>::cast(*p_args[Is])...);
274275
#endif
275-
(void)p_args;
276+
(void)p_args; // Avoid warning.
276277
}
277278

278279
template <typename T, typename... P>

include/godot_cpp/core/class_db.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@
4646

4747
#include <godot_cpp/templates/local_vector.hpp>
4848

49+
#include <godot_cpp/templates/hash_set.hpp>
4950
#include <list>
5051
#include <mutex>
51-
#include <set>
5252
#include <unordered_map>
5353

5454
// Needed to use StringName as key in `std::unordered_map`
@@ -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
@@ -410,7 +410,7 @@ void ClassDB::initialize(GDExtensionInitializationLevel p_level) {
410410
}
411411

412412
void ClassDB::deinitialize(GDExtensionInitializationLevel p_level) {
413-
std::set<StringName> to_erase;
413+
HashSet<StringName> to_erase;
414414
for (int i = class_register_order.size() - 1; i >= 0; --i) {
415415
const StringName &name = class_register_order[i];
416416
const ClassInfo &cl = classes[name];

0 commit comments

Comments
 (0)