mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-09 02:15:44 -04:00
Add guards around std library headers (#3013)
* Last fix for standard compiler error * adding define guards around headers * rename cmath.h and climits.h to cmath and climits respectively * renaming cstdarg.h to cstdarg * renaming cstdlib.h to cstdlib * renaming cstring.h to cstring * renaming cstdio.h to cstdio * renaming cmath locale ctype * renaming stdarg string and va_list * renaming cstddef * renaming stdio stddef stdlib * renaming algorithm, functional, iterator, memory, and utility * renaming bitset, cstdint, limits, and stdint * renaming new and type_traits * update quote includes for standard library headers to angle bracket includes
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
#define J2DPRINT_H
|
||||
|
||||
#include "JSystem/J2DGraph/J2DTextBox.h"
|
||||
#include <stdarg.h>
|
||||
#include <stdarg>
|
||||
|
||||
class JUTFont;
|
||||
class J2DPrint;
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "JSystem/J3DGraphBase/J3DMatBlock.h"
|
||||
#include "JSystem/J3DGraphBase/J3DPacket.h"
|
||||
#include "JSystem/J3DGraphBase/J3DShape.h"
|
||||
#include <stdint.h>
|
||||
#include <stdint>
|
||||
|
||||
class J3DJoint;
|
||||
class J3DMaterialAnm;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "JSystem/J3DGraphBase/J3DSys.h"
|
||||
#include "dolphin/gd/GDBase.h"
|
||||
#include <stdint.h>
|
||||
#include <stdint>
|
||||
|
||||
class J3DMatPacket;
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "JSystem/J3DAssert.h"
|
||||
#include "JSystem/JUtility/JUTTexture.h"
|
||||
#include "global.h"
|
||||
#include <stdint.h>
|
||||
#include <stdint>
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-j3d
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JAISEQDATAMGR_H
|
||||
|
||||
#include "JSystem/JAudio2/JAISound.h"
|
||||
#include <stdint.h>
|
||||
#include <stdint>
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jaudio
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JASGADGET_H
|
||||
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "string.h"
|
||||
#include <string>
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jaudio
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "JSystem/JAudio2/JAUBankTable.h"
|
||||
#include "JSystem/JAudio2/JAUSeqDataBlockMgr.h"
|
||||
#include "JSystem/JKernel/JKRDisposer.h"
|
||||
#include "bitset.h"
|
||||
#include <bitset>
|
||||
|
||||
class JAISeqData;
|
||||
class JAISeqDataMgr;
|
||||
|
||||
@@ -5,8 +5,8 @@
|
||||
#include "JSystem/JAudio2/JASAramStream.h"
|
||||
#include "JSystem/JAudio2/JASHeapCtrl.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "bitset.h"
|
||||
#include <stdint.h>
|
||||
#include <bitset>
|
||||
#include <stdint>
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jaudio
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "JSystem/JGadget/define.h"
|
||||
#include "JSystem/JGadget/search.h"
|
||||
#include <iterator.h>
|
||||
#include <iterator>
|
||||
|
||||
|
||||
namespace JGadget {
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
#define JGADGET_SEARCH_H
|
||||
|
||||
#include <dolphin/types.h>
|
||||
#include <iterator.h>
|
||||
#include <functional.h>
|
||||
#include <algorithm.h>
|
||||
#include <iterator>
|
||||
#include <functional>
|
||||
#include <algorithm>
|
||||
|
||||
namespace JGadget {
|
||||
namespace search {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JGADGET_STD_STREAMBUF_H
|
||||
|
||||
#include <dolphin/types.h>
|
||||
#include <string.h>
|
||||
#include <string>
|
||||
|
||||
namespace JGadget {
|
||||
template <typename T>
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
#define STD_VECTOR_H
|
||||
|
||||
#include "JSystem/JGadget/std-memory.h"
|
||||
#include <algorithm.h>
|
||||
#include <msl_memory.h>
|
||||
#include <stdint.h>
|
||||
#include <algorithm>
|
||||
#include <memory>
|
||||
#include <stdint>
|
||||
|
||||
namespace JGadget {
|
||||
namespace vector {
|
||||
|
||||
@@ -2,9 +2,14 @@
|
||||
#define JGEOMETRY_H
|
||||
|
||||
#include "dolphin/mtx.h"
|
||||
#include <math.h>
|
||||
#include <cmath>
|
||||
#include "JSystem/JMath/JMath.h"
|
||||
|
||||
#ifndef __MWERKS__
|
||||
#include <limits>
|
||||
#define FLT_EPSILON std::numeric_limits<float>::epsilon()
|
||||
#endif
|
||||
|
||||
namespace JGeometry {
|
||||
|
||||
template<typename T>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JORMCONTEXT_H
|
||||
|
||||
#include <dolphin/dolphin.h>
|
||||
#include <stdint.h>
|
||||
#include <stdint>
|
||||
#include "JSystem/JHostIO/JORReflexible.h"
|
||||
#include "JSystem/JSupport/JSUMemoryStream.h"
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JKREXPHEAP_H
|
||||
|
||||
#include "JSystem/JKernel/JKRHeap.h"
|
||||
#include <stdint.h>
|
||||
#include <stdint>
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jkernel
|
||||
|
||||
@@ -204,9 +204,11 @@ void* operator new[](size_t size, JKRHeap* heap, int alignment);
|
||||
void operator delete(void* ptr);
|
||||
void operator delete[](void* ptr);
|
||||
|
||||
#ifdef __MWERKS__
|
||||
inline void* operator new(size_t size, void* ptr) {
|
||||
return ptr;
|
||||
}
|
||||
#endif
|
||||
|
||||
void JKRDefaultMemoryErrorRoutine(void* heap, u32 size, int alignment);
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JMATRIGONOMETRIC_H
|
||||
|
||||
#include "dolphin/types.h"
|
||||
#include <utility.h>
|
||||
#include <utility>
|
||||
|
||||
namespace JMath {
|
||||
template<typename T>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JMATH_H
|
||||
|
||||
#include "dolphin/mtx.h"
|
||||
#include <math.h>
|
||||
#include <math>
|
||||
|
||||
void JMAMTXApplyScale(const Mtx, Mtx, f32, f32, f32);
|
||||
void JMAEulerToQuat(s16 param_0, s16 param_1, s16 param_2, Quaternion* param_3);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JMESSAGE_PROCESSOR_H
|
||||
|
||||
#include "JSystem/JMessage/resource.h"
|
||||
#include <algorithm.h>
|
||||
#include <algorithm>
|
||||
#include "global.h"
|
||||
|
||||
namespace JMessage {
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JPAEMITTER_H
|
||||
|
||||
#include <dolphin/gx.h>
|
||||
#include <stdint.h>
|
||||
#include <stdint>
|
||||
#include "JSystem/JParticle/JPAResource.h"
|
||||
#include "JSystem/JParticle/JPAList.h"
|
||||
#include "JSystem/JParticle/JPARandom.h"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef FUNCTIONVALUE_H
|
||||
#define FUNCTIONVALUE_H
|
||||
|
||||
#include <math.h>
|
||||
#include <math>
|
||||
#include "JSystem/JGadget/std-vector.h"
|
||||
#include "JSystem/JGadget/define.h"
|
||||
#include "JSystem/JGadget/search.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JSTUDIO_MATH_H
|
||||
|
||||
#include "dolphin/mtx.h"
|
||||
#include <math.h>
|
||||
#include <math>
|
||||
|
||||
namespace JStudio {
|
||||
namespace math {
|
||||
|
||||
@@ -3,8 +3,8 @@
|
||||
|
||||
#include "JSystem/JStudio/JStudio/jstudio-control.h"
|
||||
#include "global.h"
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
#include <limits>
|
||||
#include <math>
|
||||
|
||||
typedef struct _GXColor GXColor;
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JSUPPORT_H
|
||||
|
||||
#include <dolphin/dolphin.h>
|
||||
#include <stdint.h>
|
||||
#include <stdint>
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jsupport
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "JSystem/JGadget/linklist.h"
|
||||
#include "JSystem/JKernel/JKRDisposer.h"
|
||||
#include "JSystem/JUtility/JUTFont.h"
|
||||
#include <stdarg.h>
|
||||
#include <stdarg>
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jutility
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JUTDIRECTPRINT_H
|
||||
|
||||
#include "JSystem/JUtility/TColor.h"
|
||||
#include <stdarg.h>
|
||||
#include <stdarg>
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jutility
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
#include "JSystem/JKernel/JKRThread.h"
|
||||
#include "JSystem/JUtility/JUTGamePad.h"
|
||||
#include <stdarg.h>
|
||||
#include <stdarg>
|
||||
#include <dolphin/gx.h>
|
||||
#include <dolphin/os.h>
|
||||
#include "global.h"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JUTFONT_H
|
||||
|
||||
#include "JSystem/JUtility/TColor.h"
|
||||
#include "string.h"
|
||||
#include <string>
|
||||
|
||||
/**
|
||||
* @ingroup jsystem-jutility
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define JUTTEXTURE_H
|
||||
|
||||
#include <dolphin/gx.h>
|
||||
#include <stdint.h>
|
||||
#include <stdint>
|
||||
|
||||
class JUTPalette;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef C_M3D_H_
|
||||
#define C_M3D_H_
|
||||
|
||||
#include <math.h>
|
||||
#include <math>
|
||||
#include "dolphin/mtx.h"
|
||||
|
||||
class cM3dGAab;
|
||||
|
||||
@@ -3,6 +3,13 @@
|
||||
|
||||
#include "JSystem/JMath/JMATrigonometric.h"
|
||||
|
||||
#ifndef __MWERKS__
|
||||
#include <limits>
|
||||
#ifndef FLT_MAX
|
||||
#define FLT_MAX std::numeric_limits<float>::max()
|
||||
#endif
|
||||
#endif
|
||||
|
||||
s16 cM_rad2s(float rad);
|
||||
u16 U_GetAtanTable(float, float);
|
||||
s16 cM_atan2s(float y, float x);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define C_XYZ_H
|
||||
|
||||
#include "dolphin/mtx.h"
|
||||
#include <math.h>
|
||||
#include <math>
|
||||
|
||||
struct cXyz : Vec {
|
||||
static const cXyz Zero;
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
#include "d/d_resorce.h"
|
||||
#include "d/d_s_play.h"
|
||||
|
||||
#include <math.h>
|
||||
#include <math>
|
||||
|
||||
/**
|
||||
* @ingroup actors-objects
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define D_MENU_D_MENU_DMAP_MAP_H
|
||||
|
||||
#include "d/d_menu_dmap.h"
|
||||
#include <math.h>
|
||||
#include <math>
|
||||
|
||||
class dMenu_DmapMap_c {
|
||||
public:
|
||||
|
||||
@@ -42,7 +42,9 @@ public:
|
||||
return --mCount;
|
||||
}
|
||||
|
||||
#ifdef __MWERKS__
|
||||
static const int NAME_MAX = 9;
|
||||
#endif
|
||||
|
||||
private:
|
||||
/* 0x00 */ char mArchiveName[11];
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
#ifndef D_SAVE_D_SAVE_H
|
||||
#define D_SAVE_D_SAVE_H
|
||||
|
||||
#include "string.h"
|
||||
#include <string>
|
||||
#include "SSystem/SComponent/c_xyz.h"
|
||||
#include <dolphin/os.h>
|
||||
#include "global.h"
|
||||
|
||||
@@ -5,13 +5,13 @@
|
||||
#include "weak_bss_1109_to_1009.h" // IWYU pragma: export
|
||||
|
||||
// Fixes weak .data
|
||||
#include "cmath.h" // IWYU pragma: export
|
||||
#include <cmath> // IWYU pragma: export
|
||||
#include "JSystem/J3DGraphBase/J3DMatBlock.h" // IWYU pragma: export
|
||||
#include "Z2AudioLib/Z2Calc.h" // IWYU pragma: export
|
||||
|
||||
// Fixes weak function ordering
|
||||
#include "math.h" // IWYU pragma: export
|
||||
#include "cstring.h" // IWYU pragma: export
|
||||
#include <math> // IWYU pragma: export
|
||||
#include <cstring> // IWYU pragma: export
|
||||
#include "JSystem/JKernel/JKRDisposer.h" // IWYU pragma: export
|
||||
#include "JSystem/J3DGraphBase/J3DPacket.h" // IWYU pragma: export
|
||||
#include "JSystem/J3DGraphAnimator/J3DMaterialAnm.h" // IWYU pragma: export
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef _DOLPHIN_OS_H_
|
||||
#define _DOLPHIN_OS_H_
|
||||
|
||||
#include <cstdio.h>
|
||||
#include <cstdio>
|
||||
|
||||
#ifdef __REVOLUTION_SDK__
|
||||
#include <revolution/os.h>
|
||||
|
||||
@@ -82,7 +82,7 @@ typedef unsigned int uint;
|
||||
#define __REGISTER
|
||||
#endif
|
||||
|
||||
#include <cstddef.h>
|
||||
#include <cstddef>
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "JSystem/JFramework/JFWDisplay.h"
|
||||
#include "JSystem/JUtility/JUTAssert.h"
|
||||
#include "CaptureScreen.h"
|
||||
#include <string.h>
|
||||
#include <string>
|
||||
|
||||
void fapGm_After();
|
||||
void fapGm_Create();
|
||||
|
||||
@@ -50,9 +50,11 @@
|
||||
// Necessary for debug matches.
|
||||
#define UNUSED(x) ((void)(x))
|
||||
|
||||
#ifdef __MWERKS__
|
||||
#ifndef decltype
|
||||
#define decltype __decltype__
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define _SDA_BASE_(dummy) 0
|
||||
#define _SDA2_BASE_(dummy) 0
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
#define M_DO_M_DO_HOSTIO_H
|
||||
|
||||
#include "JSystem/JHostIO/JORReflexible.h"
|
||||
#include <string.h>
|
||||
#include <string>
|
||||
|
||||
class mDoHIO_child_c {
|
||||
public:
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef _REVOLUTION_OS_H_
|
||||
#define _REVOLUTION_OS_H_
|
||||
|
||||
#include <cstdio.h>
|
||||
#include <cstdio>
|
||||
|
||||
#include <revolution/types.h>
|
||||
#include <revolution/gx/GXStruct.h>
|
||||
|
||||
@@ -79,6 +79,6 @@ typedef unsigned int uint;
|
||||
#define __REGISTER
|
||||
#endif
|
||||
|
||||
#include <cstddef.h>
|
||||
#include <cstddef>
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#ifndef CONTEXT_BTE_H
|
||||
#define CONTEXT_BTE_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdint>
|
||||
|
||||
// taken from https://github.com/doldecomp/sdk_2009-12-11/blob/main/include/context_bte.h
|
||||
|
||||
|
||||
Reference in New Issue
Block a user