From 928c5f7584c47f4153479080649b4b00a0e2984b Mon Sep 17 00:00:00 2001 From: Alug Date: Tue, 14 Oct 2025 22:45:08 +0200 Subject: [PATCH] use stdlibs abs for CompareDrawNodePlanes we dont need our own abs for this --- src/hardware/hw_main.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/hardware/hw_main.cpp b/src/hardware/hw_main.cpp index 723b709e5..2f7855d39 100644 --- a/src/hardware/hw_main.cpp +++ b/src/hardware/hw_main.cpp @@ -65,8 +65,6 @@ // Globals // ========================================================================== -#define ABS(x) ((x) < 0 ? -(x) : (x)) - // false if shaders have not been initialized yet, or if shaders are not available boolean gl_shadersavailable = false; @@ -4295,7 +4293,7 @@ static int CompareDrawNodePlanes(const void *p1, const void *p2) const INT32 n1 = *(const INT32*)p1; const INT32 n2 = *(const INT32*)p2; - return ABS(drawnodes[n2].u.plane.fixedheight - viewz) - ABS(drawnodes[n1].u.plane.fixedheight - viewz); + return abs(drawnodes[n2].u.plane.fixedheight - viewz) - abs(drawnodes[n1].u.plane.fixedheight - viewz); } //