summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLagoLunatic <LagoLunatic@users.noreply.github.com>2024-03-09 17:05:34 -0500
committerLagoLunatic <LagoLunatic@users.noreply.github.com>2024-03-09 17:05:34 -0500
commit64dd688dddbc4d00e3fa629d0348632df2c1fa9e (patch)
treee4c86be5d09863630d91b465845857711beea26d /src
parent24b8501d3313202c37c8abb4dc4fb9e24fba1842 (diff)
Make JUT_ASSERT macro more accurate
(COND) == 0 and !(COND) both only match sometimes, but (void)((COND) || ...) seems to work all the time.
Diffstat (limited to 'src')
-rw-r--r--src/SSystem/SComponent/c_m2d.cpp4
-rw-r--r--src/d/d_bg_s_acch.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/SSystem/SComponent/c_m2d.cpp b/src/SSystem/SComponent/c_m2d.cpp
index 2009fd56..f3fe3a90 100644
--- a/src/SSystem/SComponent/c_m2d.cpp
+++ b/src/SSystem/SComponent/c_m2d.cpp
@@ -17,7 +17,7 @@ void cM2d_CrossCirLin(cM2dGCir& circle, f32 x0, f32 y0, f32 x1, f32 y1, f32* pDs
f32 c = (fVar1 * fVar1 + fVar15 * fVar15) - (circle.GetR() * circle.GetR());
f32 t;
- JUT_ASSERT_FLOAT(0x47, c < 0.0f);
+ JUT_ASSERT(0x47, c < 0.0f);
if (cM3d_IsZero(dVar13)) {
if (!cM3d_IsZero(dVar14)) {
@@ -48,7 +48,7 @@ void cM2d_CrossCirLin(cM2dGCir& circle, f32 x0, f32 y0, f32 x1, f32 y1, f32* pDs
*pDstX = x0;
*pDstY = y0;
} else {
- JUT_ASSERT_FLOAT(0x89, t >= 0.0f);
+ JUT_ASSERT(0x89, t >= 0.0f);
*pDstX = x0 + (t * x1);
*pDstY = y0 + (t * y1);
}
diff --git a/src/d/d_bg_s_acch.cpp b/src/d/d_bg_s_acch.cpp
index c31a1de8..88af2ea2 100644
--- a/src/d/d_bg_s_acch.cpp
+++ b/src/d/d_bg_s_acch.cpp
@@ -303,8 +303,8 @@ void dBgS_Acch::CrrPos(dBgS& i_bgs) {
SetWaterIn();
}
- JUT_ASSERT_FLOAT(718, m_wtr.GetHeight() >= ground.y);
- JUT_ASSERT_FLOAT(719, m_wtr.GetHeight() <= top);
+ JUT_ASSERT(718, m_wtr.GetHeight() >= ground.y);
+ JUT_ASSERT(719, m_wtr.GetHeight() <= top);
}
}
}