Style: Remove redundant DEBUG_METHODS_ENABLED

• Replaced with functionally identical and far more ubiquitous `DEBUG_ENABLED`
This commit is contained in:
Thaddeus Crews 2025-05-15 13:09:41 -05:00
parent 5e27318b6c
commit d237e31a89
No known key found for this signature in database
GPG key ID: 8C6E5FEB5FC03CCC
25 changed files with 328 additions and 337 deletions

View file

@ -36,17 +36,17 @@
#include "core/variant/variant.h"
struct _CoreConstant {
#ifdef DEBUG_METHODS_ENABLED
#ifdef DEBUG_ENABLED
bool ignore_value_in_docs = false;
bool is_bitfield = false;
#endif
#endif // DEBUG_ENABLED
StringName enum_name;
const char *name = nullptr;
int64_t value = 0;
_CoreConstant() {}
#ifdef DEBUG_METHODS_ENABLED
#ifdef DEBUG_ENABLED
_CoreConstant(const StringName &p_enum_name, const char *p_name, int64_t p_value, bool p_ignore_value_in_docs = false, bool p_is_bitfield = false) :
ignore_value_in_docs(p_ignore_value_in_docs),
is_bitfield(p_is_bitfield),
@ -60,14 +60,14 @@ struct _CoreConstant {
name(p_name),
value(p_value) {
}
#endif
#endif // DEBUG_ENABLED
};
static Vector<_CoreConstant> _global_constants;
static HashMap<StringName, int> _global_constants_map;
static HashMap<StringName, Vector<_CoreConstant>> _global_enums;
#ifdef DEBUG_METHODS_ENABLED
#ifdef DEBUG_ENABLED
#define BIND_CORE_CONSTANT(m_constant) \
_global_constants.push_back(_CoreConstant(StringName(), #m_constant, m_constant)); \
@ -249,7 +249,7 @@ static HashMap<StringName, Vector<_CoreConstant>> _global_enums;
_global_enums[enum_name].push_back((_global_constants.ptr())[_global_constants.size() - 1]); \
}
#endif
#endif // DEBUG_ENABLED
void register_global_constants() {
BIND_CORE_ENUM_CONSTANT(SIDE_LEFT);
@ -816,7 +816,7 @@ StringName CoreConstants::get_global_constant_enum(int p_idx) {
return _global_constants[p_idx].enum_name;
}
#ifdef DEBUG_METHODS_ENABLED
#ifdef DEBUG_ENABLED
bool CoreConstants::is_global_constant_bitfield(int p_idx) {
return _global_constants[p_idx].is_bitfield;
}
@ -832,7 +832,7 @@ bool CoreConstants::is_global_constant_bitfield(int p_idx) {
bool CoreConstants::get_ignore_value_in_docs(int p_idx) {
return false;
}
#endif
#endif // DEBUG_ENABLED
const char *CoreConstants::get_global_constant_name(int p_idx) {
return _global_constants[p_idx].name;