mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
Various debug conditional compilation cleanup (#2915)
* Global: Define DEBUG as 0 if not already defined * Clean up DEBUG-guarded code
This commit is contained in:
@@ -119,7 +119,7 @@ namespace JASDsp {
|
||||
extern FxBuf* FX_BUF;
|
||||
extern f32 sDSPVolume;
|
||||
|
||||
#ifdef DEBUG
|
||||
#if DEBUG
|
||||
extern s32 dspMutex;
|
||||
#endif
|
||||
};
|
||||
|
||||
@@ -33,7 +33,7 @@ private:
|
||||
int mLine;
|
||||
};
|
||||
|
||||
#ifdef DEBUG
|
||||
#if DEBUG
|
||||
|
||||
#define JGADGET_ASSERTWARN(line, COND) \
|
||||
((COND)) || (JGadget_outMessage(JGadget_outMessage::warning, __FILE__, line) << #COND, false);
|
||||
|
||||
@@ -35,14 +35,14 @@ struct JORServer;
|
||||
|
||||
class JOREventListener {
|
||||
public:
|
||||
#ifdef DEBUG
|
||||
#if DEBUG
|
||||
virtual void listenPropertyEvent(const JORPropertyEvent*) = 0;
|
||||
#endif
|
||||
};
|
||||
|
||||
class JORReflexible : public JOREventListener {
|
||||
public:
|
||||
#ifdef DEBUG
|
||||
#if DEBUG
|
||||
JORReflexible();
|
||||
static JORServer* getJORServer();
|
||||
|
||||
|
||||
@@ -266,7 +266,7 @@ inline JKRHeap* JKRGetRootHeap2() {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
#if DEBUG
|
||||
inline void JKRSetDebugFillNotuse(u8 status) { data_804508B1 = status; }
|
||||
inline void JKRSetDebugFillNew(u8 status) { data_804508B2 = status; }
|
||||
inline void JKRSetDebugFillDelete(u8 status) { data_804508B3 = status; }
|
||||
|
||||
@@ -313,7 +313,7 @@ public:
|
||||
>
|
||||
{
|
||||
TIterator_data_(const TFunctionValue_list_parameter& rParent, const f32* value) {
|
||||
#ifdef DEBUG
|
||||
#if DEBUG
|
||||
pOwn_ = &rParent;
|
||||
#endif
|
||||
pf_ = value;
|
||||
@@ -323,7 +323,7 @@ public:
|
||||
void set(const f32* value) { pf_ = value; }
|
||||
|
||||
friend bool operator==(const TIterator_data_& r1, const TIterator_data_& r2) {
|
||||
#ifdef DEBUG
|
||||
#if DEBUG
|
||||
if (!(r1.pOwn_==r2.pOwn_)) {
|
||||
JGadget_outMessage msg(JGadget_outMessage::warning, __FILE__, 124);
|
||||
msg << "r1.pOwn_==r2.pOwn_";
|
||||
@@ -333,9 +333,10 @@ public:
|
||||
}
|
||||
|
||||
f32 operator*() {
|
||||
#ifdef DEBUG
|
||||
// this guard is required - removing it breaks float regalloc in std::upper_bound
|
||||
#if DEBUG
|
||||
JUT_ASSERT(947, pf_!=NULL);
|
||||
#endif
|
||||
#endif
|
||||
return *pf_;
|
||||
}
|
||||
|
||||
@@ -357,7 +358,7 @@ public:
|
||||
}
|
||||
|
||||
friend s32 operator-(const TIterator_data_& r1, const TIterator_data_& r2) {
|
||||
#ifdef DEBUG
|
||||
#if DEBUG
|
||||
if (!(r1.pOwn_==r2.pOwn_)) {
|
||||
JGadget_outMessage msg(JGadget_outMessage::warning, __FILE__, 124);
|
||||
msg << "r1.pOwn_==r2.pOwn_";
|
||||
@@ -366,7 +367,7 @@ public:
|
||||
return (r1.pf_ - r2.pf_) / suData_size;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#if DEBUG
|
||||
/* 0x00 */ const TFunctionValue_list_parameter* pOwn_;
|
||||
/* 0x04 */ const f32* pf_;
|
||||
#else
|
||||
@@ -421,7 +422,7 @@ public:
|
||||
>
|
||||
{
|
||||
TIterator_data_(const TFunctionValue_hermite& rParent, const f32* value) {
|
||||
#ifdef DEBUG
|
||||
#if DEBUG
|
||||
pOwn_ = &rParent;
|
||||
#endif
|
||||
pf_ = value;
|
||||
@@ -435,7 +436,7 @@ public:
|
||||
}
|
||||
|
||||
friend bool operator==(const TIterator_data_& r1, const TIterator_data_& r2) {
|
||||
#ifdef DEBUG
|
||||
#if DEBUG
|
||||
if (!(r1.pOwn_==r2.pOwn_)) {
|
||||
JGadget_outMessage msg(JGadget_outMessage::warning, __FILE__, 124);
|
||||
msg << "r1.pOwn_==r2.pOwn_";
|
||||
@@ -445,7 +446,7 @@ public:
|
||||
}
|
||||
|
||||
f32 operator*() {
|
||||
#ifdef DEBUG
|
||||
#if DEBUG
|
||||
JUT_ASSERT(1098, pf_!=NULL);
|
||||
#endif
|
||||
return *pf_;
|
||||
@@ -469,7 +470,7 @@ public:
|
||||
}
|
||||
|
||||
friend s32 operator-(const TIterator_data_& r1, const TIterator_data_& r2) {
|
||||
#ifdef DEBUG
|
||||
#if DEBUG
|
||||
if (!(r1.pOwn_==r2.pOwn_)) {
|
||||
JGadget_outMessage msg(JGadget_outMessage::warning, __FILE__, 124);
|
||||
msg << "r1.pOwn_==r2.pOwn_";
|
||||
@@ -483,7 +484,7 @@ public:
|
||||
return (r1.pf_ - r2.pf_) / r1.uSize_;
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
#if DEBUG
|
||||
/* 0x00 */ const TFunctionValue_hermite* pOwn_;
|
||||
/* 0x04 */ const f32* pf_;
|
||||
/* 0x08 */ u32 uSize_;
|
||||
|
||||
@@ -47,7 +47,7 @@ struct TVariableValue {
|
||||
}
|
||||
|
||||
void setValue_none() {
|
||||
#ifdef DEBUG
|
||||
#if DEBUG
|
||||
field_0xc.fv = NULL;
|
||||
#endif
|
||||
field_0x8 = NULL;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "dolphin/os.h"
|
||||
|
||||
#ifdef DEBUG
|
||||
#if DEBUG
|
||||
#define JUT_SHOW_ASSERT(LINE, COND) JUTAssertion::showAssert(JUTAssertion::getSDevice(), __FILE__, LINE, #COND)
|
||||
|
||||
#define JUT_ASSERT(LINE, COND) \
|
||||
|
||||
Reference in New Issue
Block a user