Fix errors for msvc

Use less strict compiler flags instead of modifying source code

Add ugly defines so MSVC stops complaining about zero length arrays
This commit is contained in:
roeming
2026-01-18 18:11:54 -05:00
committed by Jeffrey Crowell
parent ef14b2b932
commit 81d679d207
105 changed files with 1871 additions and 1760 deletions
+1
View File
@@ -6,6 +6,7 @@
#include "SSystem/SComponent/c_math.h"
#include "SSystem/SComponent/c_m3d.h"
#include <cmath>
#include <global.h>
s16 cM_rad2s(f32 rad) {
s32 s = (std::fmod(rad, 2 * M_PI) * (0x8000 / M_PI));
+1
View File
@@ -4,6 +4,7 @@
*/
#include "SSystem/SComponent/c_phase.h"
#include "global.h"
void cPhs_Reset(request_of_phase_process_class* phase) {
phase->id = cPhs_INIT_e;
+4 -1
View File
@@ -6,11 +6,14 @@
#include "SSystem/SComponent/c_xyz.h"
#include "SSystem/SComponent/c_math.h"
#include "JSystem/JUtility/JUTAssert.h"
#include "global.h"
#ifndef __MWERKS__
#ifndef _MSVC_LANG
#include <limits>
#define FLT_EPSILON std::numeric_limits<float>::epsilon()
#endif
#endif
cXyz cXyz::operator+(const Vec& vec) const {
Vec ret;
@@ -82,7 +85,7 @@ cXyz cXyz::normZC() const {
outVec.x = 0.0f;
outVec.y = 0.0f;
outVec.z = 1.0f;
outVec = (Vec){0,0,1};
outVec = COMPOUND_LITERAL(Vec){0,0,1};
}
}