mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-04 11:19:58 -04: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:
@@ -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_;
|
||||
|
||||
Reference in New Issue
Block a user