From ed576f8318b7bfed488f2f1fee2bc9126f671a60 Mon Sep 17 00:00:00 2001 From: Marc Gilleron Date: Fri, 8 Mar 2024 19:42:07 +0000 Subject: [PATCH] Fix explicit namespaces in macros (cherry picked from commit e6077906474ba3c3d31b59ea079b3381ae5b0095) --- include/godot_cpp/core/class_db.hpp | 8 ++++---- include/godot_cpp/core/object.hpp | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/include/godot_cpp/core/class_db.hpp b/include/godot_cpp/core/class_db.hpp index bafd2ce1..5b0a6ddf 100644 --- a/include/godot_cpp/core/class_db.hpp +++ b/include/godot_cpp/core/class_db.hpp @@ -155,20 +155,20 @@ public: }; #define BIND_CONSTANT(m_constant) \ - godot::ClassDB::bind_integer_constant(get_class_static(), "", #m_constant, m_constant); + ::godot::ClassDB::bind_integer_constant(get_class_static(), "", #m_constant, m_constant); #define BIND_ENUM_CONSTANT(m_constant) \ - godot::ClassDB::bind_integer_constant(get_class_static(), godot::_gde_constant_get_enum_name(m_constant, #m_constant), #m_constant, m_constant); + ::godot::ClassDB::bind_integer_constant(get_class_static(), ::godot::_gde_constant_get_enum_name(m_constant, #m_constant), #m_constant, m_constant); #define BIND_BITFIELD_FLAG(m_constant) \ - godot::ClassDB::bind_integer_constant(get_class_static(), godot::_gde_constant_get_bitfield_name(m_constant, #m_constant), #m_constant, m_constant, true); + ::godot::ClassDB::bind_integer_constant(get_class_static(), ::godot::_gde_constant_get_bitfield_name(m_constant, #m_constant), #m_constant, m_constant, true); #define BIND_VIRTUAL_METHOD(m_class, m_method) \ { \ auto _call##m_method = [](GDExtensionObjectPtr p_instance, const GDExtensionConstTypePtr *p_args, GDExtensionTypePtr p_ret) -> void { \ call_with_ptr_args(reinterpret_cast(p_instance), &m_class::m_method, p_args, p_ret); \ }; \ - godot::ClassDB::bind_virtual_method(m_class::get_class_static(), #m_method, _call##m_method); \ + ::godot::ClassDB::bind_virtual_method(m_class::get_class_static(), #m_method, _call##m_method); \ } template diff --git a/include/godot_cpp/core/object.hpp b/include/godot_cpp/core/object.hpp index d66e3889..eb0c4d16 100644 --- a/include/godot_cpp/core/object.hpp +++ b/include/godot_cpp/core/object.hpp @@ -45,10 +45,10 @@ #include -#define ADD_SIGNAL(m_signal) godot::ClassDB::add_signal(get_class_static(), m_signal) -#define ADD_GROUP(m_name, m_prefix) godot::ClassDB::add_property_group(get_class_static(), m_name, m_prefix) -#define ADD_SUBGROUP(m_name, m_prefix) godot::ClassDB::add_property_subgroup(get_class_static(), m_name, m_prefix) -#define ADD_PROPERTY(m_property, m_setter, m_getter) godot::ClassDB::add_property(get_class_static(), m_property, m_setter, m_getter) +#define ADD_SIGNAL(m_signal) ::godot::ClassDB::add_signal(get_class_static(), m_signal) +#define ADD_GROUP(m_name, m_prefix) ::godot::ClassDB::add_property_group(get_class_static(), m_name, m_prefix) +#define ADD_SUBGROUP(m_name, m_prefix) ::godot::ClassDB::add_property_subgroup(get_class_static(), m_name, m_prefix) +#define ADD_PROPERTY(m_property, m_setter, m_getter) ::godot::ClassDB::add_property(get_class_static(), m_property, m_setter, m_getter) namespace godot {