Fix JUT_ASSERT and several other macros (#2711)

* Fix JUT_ASSERT to be a nested define

* Switch names that appear in asserts to be constants instead of defines

* Replace `0` in asserts with `NULL` or `FALSE`

* Fix fpclassify

* Fix ARRAY_SIZE

* Use G_CM3D_F_INF

* More fixes for fpclassify

* Remove FLOAT_LABEL

* Remove incorrect FLAG_ON macro

* Remove UNK_BSS macro

* Silence clangd unused header warning for PCH
This commit is contained in:
LagoLunatic
2025-09-28 16:11:07 -04:00
committed by GitHub
parent 737250d7f5
commit 6ec6fce8cb
1008 changed files with 3172 additions and 3237 deletions
+1 -1
View File
@@ -11,7 +11,7 @@ namespace ctb {
struct TObject : public object::TObject_ID {
TObject(const void* id, u32 size, const void* param_2) : object::TObject_ID(id, size) {
pData_ = param_2;
JUT_ASSERT(82, pData_!=0);
JUT_ASSERT(82, pData_!=NULL);
}
/* 80280F18 */ virtual ~TObject() = 0;
virtual int getScheme() const = 0;
@@ -338,7 +338,7 @@ public:
f32 operator*() {
#ifdef DEBUG
JUT_ASSERT(947, pf_!=0);
JUT_ASSERT(947, pf_!=NULL);
#endif
return *pf_;
}
@@ -451,7 +451,7 @@ public:
f32 operator*() {
#ifdef DEBUG
JUT_ASSERT(1098, pf_!=0);
JUT_ASSERT(1098, pf_!=NULL);
#endif
return *pf_;
}
@@ -123,13 +123,13 @@ public:
CMtxP transformOnSet_getMatrix() const { return mTransformOnSet_Matrix; }
void transformOnSet_transformTranslation(const Vec& rSrc, Vec* pDst) const {
JUT_ASSERT(226, pDst!=0);
JUT_ASSERT(226, pDst!=NULL);
JUT_ASSERT(227, &rSrc!=pDst);
MTXMultVec(transformOnSet_getMatrix(), &rSrc, pDst);
}
void transformOnSet_transformRotation(const Vec& rSrc, Vec* pDst) const {
JUT_ASSERT(232, pDst!=0);
JUT_ASSERT(232, pDst!=NULL);
JUT_ASSERT(233, &rSrc!=pDst);
pDst->x = rSrc.x;
pDst->y = rSrc.y + mTransformOnSet_RotationY;
@@ -137,7 +137,7 @@ public:
}
void transformOnSet_transformScaling(const Vec& rSrc, Vec* pDst) const {
JUT_ASSERT(240, pDst!=0);
JUT_ASSERT(240, pDst!=NULL);
JUT_ASSERT(241, &rSrc!=pDst);
*pDst = rSrc;
}
@@ -176,20 +176,20 @@ public:
CMtxP transformOnGet_getMatrix() const { return mTransformOnGet_Matrix; }
void transformOnGet_transformTranslation(const Vec& rSrc, Vec* pDst) const {
JUT_ASSERT(296, pDst!=0);
JUT_ASSERT(296, pDst!=NULL);
JUT_ASSERT(297, &rSrc!=pDst);
MTXMultVec(transformOnGet_getMatrix(), &rSrc, pDst);
}
void transformOnGet_transformDirection(const Vec& rSrc, Vec* pDst) const {
JUT_ASSERT(316, pDst!=0);
JUT_ASSERT(316, pDst!=NULL);
JUT_ASSERT(317, &rSrc!=pDst);
MTXMultVecSR(transformOnGet_getMatrix(), &rSrc, pDst);
}
void transformOnGet_transform(TTransform_position_direction* param_1,
TTransform_position_direction* pDst) const {
JUT_ASSERT(289, pDst!=0);
JUT_ASSERT(289, pDst!=NULL);
transformOnGet_transformTranslation(param_1->position, &pDst->position);
transformOnGet_transformDirection(param_1->direction, &pDst->direction);
}
@@ -220,7 +220,7 @@ public:
}
void transformOnGet_transformRotation(const Vec& rSrc, Vec* pDst) const {
JUT_ASSERT(302, pDst!=0);
JUT_ASSERT(302, pDst!=NULL);
JUT_ASSERT(303, &rSrc!=pDst);
pDst->x = rSrc.x;
pDst->y = rSrc.y + mTransformOnGet_RotationY;
@@ -228,14 +228,14 @@ public:
}
void transformOnGet_transformScaling(const Vec& rSrc, Vec* pDst) const {
JUT_ASSERT(310, pDst!=0);
JUT_ASSERT(310, pDst!=NULL);
JUT_ASSERT(311, &rSrc!=pDst);
*pDst = rSrc;
}
void transformOnGet_transform(TTransform_translation_rotation_scaling* param_1,
TTransform_translation_rotation_scaling* pDst) const {
JUT_ASSERT(263, pDst!=0);
JUT_ASSERT(263, pDst!=NULL);
transformOnGet_transformTranslation(param_1->translation, &pDst->translation);
transformOnGet_transformRotation(param_1->rotation, &pDst->rotation);
transformOnGet_transformScaling(param_1->scaling, &pDst->scaling);
@@ -252,14 +252,14 @@ public:
}
void transformOnSet_transformDirection(const Vec& rSrc, Vec* pDst) const {
JUT_ASSERT(246, pDst!=0);
JUT_ASSERT(246, pDst!=NULL);
JUT_ASSERT(247, &rSrc!=pDst);
MTXMultVecSR(transformOnSet_getMatrix(), &rSrc, pDst);
}
void transformOnSet_transform(TTransform_position_direction* param_1,
TTransform_position_direction* pDst) const {
JUT_ASSERT(219, pDst!=0);
JUT_ASSERT(219, pDst!=NULL);
transformOnSet_transformTranslation(param_1->position, &pDst->position);
transformOnSet_transformDirection(param_1->direction, &pDst->direction);
}