summaryrefslogtreecommitdiff
path: root/core/object
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2023-01-06 00:10:31 +0100
committerRémi Verschelde <rverschelde@gmail.com>2023-01-06 00:10:31 +0100
commit1816f49886c32c89e328edfe4fbd99fcf9292530 (patch)
treead86b018b00aaede7cbf959a4cf0d1a5e68042bc /core/object
parente5f6e0349010ee05035ad2864b94614e00b8f27a (diff)
parent6f31f7b0bc1e4ab055a37f55be5b300568cda374 (diff)
Merge pull request #64253 from heppocogne/Fix-native-enum-release-1
Register enum type names in release build
Diffstat (limited to 'core/object')
-rw-r--r--core/object/class_db.h19
1 files changed, 5 insertions, 14 deletions
diff --git a/core/object/class_db.h b/core/object/class_db.h
index f1856b1817..0e408e8845 100644
--- a/core/object/class_db.h
+++ b/core/object/class_db.h
@@ -372,17 +372,17 @@ public:
static uint64_t get_native_struct_size(const StringName &p_name); // Used for asserting
};
-#ifdef DEBUG_METHODS_ENABLED
-
-#define BIND_CONSTANT(m_constant) \
- ::ClassDB::bind_integer_constant(get_class_static(), StringName(), #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);
#define BIND_BITFIELD_FLAG(m_constant) \
::ClassDB::bind_integer_constant(get_class_static(), __constant_get_bitfield_name(m_constant, #m_constant), #m_constant, m_constant, true);
+#define BIND_CONSTANT(m_constant) \
+ ::ClassDB::bind_integer_constant(get_class_static(), StringName(), #m_constant, m_constant);
+
+#ifdef DEBUG_METHODS_ENABLED
+
_FORCE_INLINE_ void errarray_add_str(Vector<Error> &arr) {
}
@@ -408,15 +408,6 @@ _FORCE_INLINE_ Vector<Error> errarray(P... p_args) {
#else
-#define BIND_CONSTANT(m_constant) \
- ::ClassDB::bind_integer_constant(get_class_static(), StringName(), #m_constant, m_constant);
-
-#define BIND_ENUM_CONSTANT(m_constant) \
- ::ClassDB::bind_integer_constant(get_class_static(), StringName(), #m_constant, m_constant);
-
-#define BIND_BITFIELD_FLAG(m_constant) \
- ::ClassDB::bind_integer_constant(get_class_static(), StringName(), #m_constant, m_constant, true);
-
#define BIND_METHOD_ERR_RETURN_DOC(m_method, ...)
#endif