@@ -40,9 +40,9 @@ class CallableCustomMethodPointerBase : public CallableCustom {
4040 uint32_t *comp_ptr = nullptr ;
4141 uint32_t comp_size;
4242 uint32_t h;
43- #ifdef DEBUG_METHODS_ENABLED
43+ #ifdef DEBUG_ENABLED
4444 const char *text = " " ;
45- #endif
45+ #endif // DEBUG_ENABLED
4646 static bool compare_equal (const CallableCustom *p_a, const CallableCustom *p_b);
4747 static bool compare_less (const CallableCustom *p_a, const CallableCustom *p_b);
4848
@@ -51,14 +51,14 @@ class CallableCustomMethodPointerBase : public CallableCustom {
5151
5252public:
5353 virtual StringName get_method () const {
54- #ifdef DEBUG_METHODS_ENABLED
54+ #ifdef DEBUG_ENABLED
5555 return StringName (text);
5656#else
5757 return StringName ();
58- #endif
58+ #endif // DEBUG_ENABLED
5959 }
6060
61- #ifdef DEBUG_METHODS_ENABLED
61+ #ifdef DEBUG_ENABLED
6262 void set_text (const char *p_text) {
6363 text = p_text;
6464 }
@@ -69,7 +69,7 @@ class CallableCustomMethodPointerBase : public CallableCustom {
6969 virtual String get_as_text () const {
7070 return String ();
7171 }
72- #endif
72+ #endif // DEBUG_ENABLED
7373 virtual CompareEqualFunc get_compare_equal_func () const ;
7474 virtual CompareLessFunc get_compare_less_func () const ;
7575
@@ -117,29 +117,29 @@ class CallableCustomMethodPointer : public CallableCustomMethodPointerBase {
117117
118118template <typename T, typename ... P>
119119Callable create_custom_callable_function_pointer (T *p_instance,
120- #ifdef DEBUG_METHODS_ENABLED
120+ #ifdef DEBUG_ENABLED
121121 const char *p_func_text,
122- #endif
122+ #endif // DEBUG_ENABLED
123123 void (T::*p_method)(P...)) {
124124 typedef CallableCustomMethodPointer<T, void , P...> CCMP; // Messes with memnew otherwise.
125125 CCMP *ccmp = memnew (CCMP (p_instance, p_method));
126- #ifdef DEBUG_METHODS_ENABLED
126+ #ifdef DEBUG_ENABLED
127127 ccmp->set_text (p_func_text + 1 ); // Try to get rid of the ampersand.
128- #endif
128+ #endif // DEBUG_ENABLED
129129 return Callable (ccmp);
130130}
131131
132132template <typename T, typename R, typename ... P>
133133Callable create_custom_callable_function_pointer (T *p_instance,
134- #ifdef DEBUG_METHODS_ENABLED
134+ #ifdef DEBUG_ENABLED
135135 const char *p_func_text,
136- #endif
136+ #endif // DEBUG_ENABLED
137137 R (T::*p_method)(P...)) {
138138 typedef CallableCustomMethodPointer<T, R, P...> CCMP; // Messes with memnew otherwise.
139139 CCMP *ccmp = memnew (CCMP (p_instance, p_method));
140- #ifdef DEBUG_METHODS_ENABLED
140+ #ifdef DEBUG_ENABLED
141141 ccmp->set_text (p_func_text + 1 ); // Try to get rid of the ampersand.
142- #endif
142+ #endif // DEBUG_ENABLED
143143 return Callable (ccmp);
144144}
145145
@@ -186,37 +186,37 @@ class CallableCustomMethodPointerC : public CallableCustomMethodPointerBase {
186186
187187template <typename T, typename ... P>
188188Callable create_custom_callable_function_pointer (T *p_instance,
189- #ifdef DEBUG_METHODS_ENABLED
189+ #ifdef DEBUG_ENABLED
190190 const char *p_func_text,
191- #endif
191+ #endif // DEBUG_ENABLED
192192 void (T::*p_method)(P...) const ) {
193193 typedef CallableCustomMethodPointerC<T, void , P...> CCMP; // Messes with memnew otherwise.
194194 CCMP *ccmp = memnew (CCMP (p_instance, p_method));
195- #ifdef DEBUG_METHODS_ENABLED
195+ #ifdef DEBUG_ENABLED
196196 ccmp->set_text (p_func_text + 1 ); // Try to get rid of the ampersand.
197- #endif
197+ #endif // DEBUG_ENABLED
198198 return Callable (ccmp);
199199}
200200
201201template <typename T, typename R, typename ... P>
202202Callable create_custom_callable_function_pointer (T *p_instance,
203- #ifdef DEBUG_METHODS_ENABLED
203+ #ifdef DEBUG_ENABLED
204204 const char *p_func_text,
205205#endif
206206 R (T::*p_method)(P...) const ) {
207207 typedef CallableCustomMethodPointerC<T, R, P...> CCMP; // Messes with memnew otherwise.
208208 CCMP *ccmp = memnew (CCMP (p_instance, p_method));
209- #ifdef DEBUG_METHODS_ENABLED
209+ #ifdef DEBUG_ENABLED
210210 ccmp->set_text (p_func_text + 1 ); // Try to get rid of the ampersand.
211- #endif
211+ #endif // DEBUG_ENABLED
212212 return Callable (ccmp);
213213}
214214
215- #ifdef DEBUG_METHODS_ENABLED
215+ #ifdef DEBUG_ENABLED
216216#define callable_mp (I, M ) create_custom_callable_function_pointer(I, #M, M)
217217#else
218218#define callable_mp (I, M ) create_custom_callable_function_pointer(I, M)
219- #endif
219+ #endif // DEBUG_ENABLED
220220
221221// STATIC VERSIONS
222222
@@ -257,33 +257,33 @@ class CallableCustomStaticMethodPointer : public CallableCustomMethodPointerBase
257257
258258template <typename ... P>
259259Callable create_custom_callable_static_function_pointer (
260- #ifdef DEBUG_METHODS_ENABLED
260+ #ifdef DEBUG_ENABLED
261261 const char *p_func_text,
262- #endif
262+ #endif // DEBUG_ENABLED
263263 void (*p_method)(P...)) {
264264 typedef CallableCustomStaticMethodPointer<void , P...> CCMP; // Messes with memnew otherwise.
265265 CCMP *ccmp = memnew (CCMP (p_method));
266- #ifdef DEBUG_METHODS_ENABLED
266+ #ifdef DEBUG_ENABLED
267267 ccmp->set_text (p_func_text + 1 ); // Try to get rid of the ampersand.
268- #endif
268+ #endif // DEBUG_ENABLED
269269 return Callable (ccmp);
270270}
271271
272272template <typename R, typename ... P>
273273Callable create_custom_callable_static_function_pointer (
274- #ifdef DEBUG_METHODS_ENABLED
274+ #ifdef DEBUG_ENABLED
275275 const char *p_func_text,
276- #endif
276+ #endif // DEBUG_ENABLED
277277 R (*p_method)(P...)) {
278278 typedef CallableCustomStaticMethodPointer<R, P...> CCMP; // Messes with memnew otherwise.
279279 CCMP *ccmp = memnew (CCMP (p_method));
280- #ifdef DEBUG_METHODS_ENABLED
280+ #ifdef DEBUG_ENABLED
281281 ccmp->set_text (p_func_text + 1 ); // Try to get rid of the ampersand.
282- #endif
282+ #endif // DEBUG_ENABLED
283283 return Callable (ccmp);
284284}
285285
286- #ifdef DEBUG_METHODS_ENABLED
286+ #ifdef DEBUG_ENABLED
287287#define callable_mp_static (M ) create_custom_callable_static_function_pointer(#M, M)
288288#else
289289#define callable_mp_static (M ) create_custom_callable_static_function_pointer(M)
0 commit comments