From 9eea9289b1c4316d5856d1cb9602ee463d7de989 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Sun, 28 Sep 2025 16:11:07 -0400 Subject: 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 --- src/d/d_map_path_dmap.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/d/d_map_path_dmap.cpp') diff --git a/src/d/d_map_path_dmap.cpp b/src/d/d_map_path_dmap.cpp index cda14658c8..469c9acfbc 100644 --- a/src/d/d_map_path_dmap.cpp +++ b/src/d/d_map_path_dmap.cpp @@ -3,7 +3,7 @@ * */ -#include "d/dolzel.h" +#include "d/dolzel.h" // IWYU pragma: keep #include "d/d_map_path_dmap.h" #include "d/actor/d_a_player.h" @@ -435,7 +435,7 @@ int dMpath_c::getTopBottomFloorNo(s8* i_topFloorNo, s8* i_bottomFloorNo) { /* 8003F7E8-8003F810 03A128 0028+00 0/0 1/1 0/0 .text createWork__8dMpath_cFv */ void dMpath_c::createWork() { mLayerList = new dDrawPath_c::layer_data; - JUT_ASSERT(1416, mLayerList!=0); + JUT_ASSERT(1416, mLayerList!=NULL); } /* 8003F810-8003FA40 03A150 0230+00 1/1 1/1 0/0 .text @@ -1114,7 +1114,7 @@ void renderingPlusDoorAndCursor_c::drawTreasure() { int group_num = getIconGroupNumber(tmp); if (group_num != 0) { - JUT_ASSERT(0xaf9, typeGroupData_p != 0); + JUT_ASSERT(0xaf9, typeGroupData_p != NULL); f32 icon_size = getIconSize(tmp) * mCmPerTexel; f32 icon_size_2 = icon_size; @@ -1190,7 +1190,7 @@ void renderingPlusDoorAndCursor_c::drawTreasureAfterPlayer() { int group_num = getIconGroupNumber(tmp); if (group_num != 0) { - JUT_ASSERT(0xb7e, typeGroupData_p != 0); + JUT_ASSERT(0xb7e, typeGroupData_p != NULL); f32 icon_size = getIconSize(tmp) * mCmPerTexel; f32 icon_size_2 = icon_size; -- cgit v1.2.3