diff options
author | bigbossbro08 <bigbossbro08@gmail.com> | 2020-05-10 17:49:33 +0200 |
---|---|---|
committer | bigbossbro08 <bigbossbro08@gmail.com> | 2020-05-10 17:49:33 +0200 |
commit | c798e1bacdaabaf140ff3904948fd7cec46c09bb (patch) | |
tree | ef6d50874117bcc819b90dcd231d74f23fa0108d /src/modelinfo | |
parent | defined out asserts. (diff) | |
download | re3-c798e1bacdaabaf140ff3904948fd7cec46c09bb.tar re3-c798e1bacdaabaf140ff3904948fd7cec46c09bb.tar.gz re3-c798e1bacdaabaf140ff3904948fd7cec46c09bb.tar.bz2 re3-c798e1bacdaabaf140ff3904948fd7cec46c09bb.tar.lz re3-c798e1bacdaabaf140ff3904948fd7cec46c09bb.tar.xz re3-c798e1bacdaabaf140ff3904948fd7cec46c09bb.tar.zst re3-c798e1bacdaabaf140ff3904948fd7cec46c09bb.zip |
Diffstat (limited to '')
-rw-r--r-- | src/modelinfo/BaseModelInfo.h | 6 | ||||
-rw-r--r-- | src/modelinfo/ClumpModelInfo.h | 4 | ||||
-rw-r--r-- | src/modelinfo/PedModelInfo.h | 2 | ||||
-rw-r--r-- | src/modelinfo/SimpleModelInfo.h | 4 | ||||
-rw-r--r-- | src/modelinfo/TimeModelInfo.h | 4 | ||||
-rw-r--r-- | src/modelinfo/VehicleModelInfo.h | 4 |
6 files changed, 7 insertions, 17 deletions
diff --git a/src/modelinfo/BaseModelInfo.h b/src/modelinfo/BaseModelInfo.h index ce42cb3a..783f871f 100644 --- a/src/modelinfo/BaseModelInfo.h +++ b/src/modelinfo/BaseModelInfo.h @@ -15,7 +15,7 @@ enum ModelInfoType : uint8 MITYPE_PED = 6, MITYPE_XTRACOMPS = 7, }; -static_assert(sizeof(ModelInfoType) == 1, "ModeInfoType: error"); +VALIDATE_SIZE(ModelInfoType, 1); class C2dEffect; @@ -70,6 +70,4 @@ public: uint16 GetNumRefs() const { return m_refCount; } }; -#ifdef CHECK_STRUCT_SIZES -static_assert(sizeof(CBaseModelInfo) == 0x30, "CBaseModelInfo: error"); -#endif +VALIDATE_SIZE(CBaseModelInfo, 0x30); diff --git a/src/modelinfo/ClumpModelInfo.h b/src/modelinfo/ClumpModelInfo.h index a4ba2c9e..58b6de11 100644 --- a/src/modelinfo/ClumpModelInfo.h +++ b/src/modelinfo/ClumpModelInfo.h @@ -51,6 +51,4 @@ public: static RwFrame *GetFrameFromId(RpClump *clump, int32 id); }; -#ifdef CHECK_STRUCT_SIZES -static_assert(sizeof(CClumpModelInfo) == 0x34, "CClumpModelInfo: error"); -#endif +VALIDATE_SIZE(CClumpModelInfo, 0x34); diff --git a/src/modelinfo/PedModelInfo.h b/src/modelinfo/PedModelInfo.h index a2bfd122..84ada087 100644 --- a/src/modelinfo/PedModelInfo.h +++ b/src/modelinfo/PedModelInfo.h @@ -55,5 +55,5 @@ public: #endif }; #ifndef PED_SKIN -static_assert(sizeof(CPedModelInfo) == 0x48, "CPedModelInfo: error"); +VALIDATE_SIZE(CPedModelInfo, 0x48); #endif
\ No newline at end of file diff --git a/src/modelinfo/SimpleModelInfo.h b/src/modelinfo/SimpleModelInfo.h index 65ff8c52..ee63f24b 100644 --- a/src/modelinfo/SimpleModelInfo.h +++ b/src/modelinfo/SimpleModelInfo.h @@ -50,6 +50,4 @@ public: m_atomics[2] = (RpAtomic*)m; } }; -#ifdef CHECK_STRUCT_SIZES -static_assert(sizeof(CSimpleModelInfo) == 0x4C, "CSimpleModelInfo: error"); -#endif +VALIDATE_SIZE(CSimpleModelInfo, 0x4C); diff --git a/src/modelinfo/TimeModelInfo.h b/src/modelinfo/TimeModelInfo.h index cbe171e0..73b6ab26 100644 --- a/src/modelinfo/TimeModelInfo.h +++ b/src/modelinfo/TimeModelInfo.h @@ -18,6 +18,4 @@ public: CTimeModelInfo *FindOtherTimeModel(void); }; -#ifdef CHECK_STRUCT_SIZES -static_assert(sizeof(CTimeModelInfo) == 0x58, "CTimeModelInfo: error"); -#endif
\ No newline at end of file +VALIDATE_SIZE(CTimeModelInfo, 0x58); diff --git a/src/modelinfo/VehicleModelInfo.h b/src/modelinfo/VehicleModelInfo.h index 160c846b..ba25d3cd 100644 --- a/src/modelinfo/VehicleModelInfo.h +++ b/src/modelinfo/VehicleModelInfo.h @@ -124,6 +124,4 @@ public: static void SetComponentsToUse(int8 c1, int8 c2) { ms_compsToUse[0] = c1; ms_compsToUse[1] = c2; } }; -#ifdef CHECK_STRUCT_SIZES -static_assert(sizeof(CVehicleModelInfo) == 0x1F8, "CVehicleModelInfo: error"); -#endif +VALIDATE_SIZE(CVehicleModelInfo, 0x1F8); |