From bf4053fefa301a307065a07ffc4c3f9f970f2638 Mon Sep 17 00:00:00 2001 From: LagoLunatic Date: Mon, 27 Jan 2025 01:01:05 -0500 Subject: Fix spurious differences when using `ninja diff` (#2294) * Fix spurious differences when using ninja diff * Fix some clangd errors/warnings --- src/JSystem/JMath/JMATrigonometric.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'src/JSystem/JMath/JMATrigonometric.cpp') diff --git a/src/JSystem/JMath/JMATrigonometric.cpp b/src/JSystem/JMath/JMATrigonometric.cpp index 0e9936b301..b5b0ca4b02 100644 --- a/src/JSystem/JMath/JMATrigonometric.cpp +++ b/src/JSystem/JMath/JMATrigonometric.cpp @@ -9,13 +9,17 @@ #include "dol2asm.h" #include "global.h" +static f32 dummy() { + return 0.0f; +} + namespace std { template struct pair { A1 a1; B1 b1; pair() { - f32 tmp = FLOAT_LABEL(zero); + f32 tmp = 0.0f; a1 = tmp; b1 = tmp; // a1 = A1(); @@ -24,9 +28,6 @@ struct pair { }; } // namespace std -// fake, but couldn't find another way to make 0.0f go first in sdata2 in this TU -SECTION_SDATA2 static f32 zero[1 + 1] = {0.0f, 0.0f}; - inline f64 getConst() { return 6.2831854820251465; } @@ -54,7 +55,7 @@ struct TAtanTable { for (int i = 0; i < (u32)1024; i++) { table[i] = atan(getConst2() * i); } - table[0] = FLOAT_LABEL(zero); + table[0] = 0.0f; table[1024] = 0.7853982; // 0.25 * PI } }; @@ -66,7 +67,7 @@ struct TAsinAcosTable { for (int i = 0; i < 1024; i++) { table[i] = asin(getConst2() * i); } - table[0] = FLOAT_LABEL(zero); + table[0] = 0.0f; table[1024] = 0.7853982; // 0.25 * PI } }; @@ -87,4 +88,4 @@ TAtanTable atanTable_; /* 8044AA40-8044BA60 077760 1020+00 1/1 1/1 0/0 .bss asinAcosTable___5JMath */ TAsinAcosTable asinAcosTable_; -} // namespace JMath \ No newline at end of file +} // namespace JMath -- cgit v1.2.3