From 76c4adb7f88e17ee50c0f65243420c4a00116b4f Mon Sep 17 00:00:00 2001 From: Bradley Clemetson Date: Sat, 18 Dec 2021 15:16:14 -0800 Subject: [PATCH] Normalized additional macros to ensure that everything works without client code needing using --- include/godot_cpp/core/class_db.hpp | 6 +++--- include/godot_cpp/core/object.hpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/include/godot_cpp/core/class_db.hpp b/include/godot_cpp/core/class_db.hpp index 37bc1425..9f551525 100644 --- a/include/godot_cpp/core/class_db.hpp +++ b/include/godot_cpp/core/class_db.hpp @@ -121,17 +121,17 @@ public: }; #define BIND_CONSTANT(m_constant) \ - 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) \ - ClassDB::bind_integer_constant(get_class_static(), __constant_get_enum_name(m_constant, #m_constant), #m_constant, m_constant); + godot::ClassDB::bind_integer_constant(get_class_static(), godot::__constant_get_enum_name(m_constant, #m_constant), #m_constant, m_constant); #define BIND_VIRTUAL_METHOD(m_class, m_method) \ { \ auto ___call##m_method = [](GDNativeObjectPtr p_instance, const GDNativeTypePtr *p_args, GDNativeTypePtr p_ret) -> void { \ call_with_ptr_args(reinterpret_cast(p_instance), &m_class::m_method, p_args, p_ret); \ }; \ - 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 55b93c95..658f9be9 100644 --- a/include/godot_cpp/core/object.hpp +++ b/include/godot_cpp/core/object.hpp @@ -42,10 +42,10 @@ #include -#define ADD_SIGNAL(m_signal) ClassDB::add_signal(get_class_static(), m_signal) -#define ADD_GROUP(m_name, m_prefix) ClassDB::add_property_group(get_class_static(), m_name, m_prefix) -#define ADD_SUBGROUP(m_name, m_prefix) ClassDB::add_property_subgroup(get_class_static(), m_name, m_prefix) -#define ADD_PROPERTY(m_property, m_setter, m_getter) 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 {