mirror of https://github.com/zeldaret/tp.git
c_m3d: Make use of forward declarations (#104)
Some inline helper function of the included files in the header make use of functions defined within it. This can cause a circular dependency cycle if said helper functions are ever defined within the classes. To break this potential cycle, we can use forward declarations. This also has the benefit of reducing preprocessing overhead a little bit.
This commit is contained in:
parent
1e105b87f1
commit
c37cd04585
|
@ -1,8 +1,9 @@
|
|||
#ifndef C_CC_D_H_
|
||||
#define C_CC_D_H_
|
||||
|
||||
#include "SComponent/c_m3d.h"
|
||||
#include "global.h"
|
||||
#include "SComponent/c_m3d_g_aab.h"
|
||||
#include "SComponent/c_m3d_g_cps.h"
|
||||
#include "SComponent/c_m3d_g_cyl.h"
|
||||
|
||||
class cCcD_ShapeAttr {
|
||||
public:
|
||||
|
|
|
@ -1,18 +1,20 @@
|
|||
#ifndef C_M3D_H_
|
||||
#define C_M3D_H_
|
||||
|
||||
#include "SComponent/c_m3d_g_aab.h"
|
||||
#include "SComponent/c_m3d_g_cps.h"
|
||||
#include "SComponent/c_m3d_g_cyl.h"
|
||||
#include "SComponent/c_m3d_g_lin.h"
|
||||
#include "SComponent/c_m3d_g_pla.h"
|
||||
#include "SComponent/c_m3d_g_sph.h"
|
||||
#include "SComponent/c_m3d_g_tri.h"
|
||||
#include "SComponent/c_sxyz.h"
|
||||
#include "SComponent/c_xyz.h"
|
||||
#include "global.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
class cM3dGAab;
|
||||
class cM3dGCps;
|
||||
class cM3dGCyl;
|
||||
class cM3dGLin;
|
||||
class cM3dGPla;
|
||||
class cM3dGSph;
|
||||
class cM3dGTri;
|
||||
class csXyz;
|
||||
class cXyz;
|
||||
|
||||
struct cM3d_Range;
|
||||
struct Vec;
|
||||
|
||||
void cM3d_InDivPos1(const Vec*, const Vec*, f32, Vec*);
|
||||
void cM3d_InDivPos2(const Vec*, const Vec*, f32, Vec*);
|
||||
|
|
|
@ -1,6 +1,16 @@
|
|||
/* c_m3d.cpp autogenerated by split.py v0.3 at 2021-01-01 14:58:46.459661 */
|
||||
|
||||
#include "SComponent/c_m3d.h"
|
||||
#include "SComponent/c_m3d_g_aab.h"
|
||||
#include "SComponent/c_m3d_g_cps.h"
|
||||
#include "SComponent/c_m3d_g_cyl.h"
|
||||
#include "SComponent/c_m3d_g_lin.h"
|
||||
#include "SComponent/c_m3d_g_pla.h"
|
||||
#include "SComponent/c_m3d_g_sph.h"
|
||||
#include "SComponent/c_m3d_g_tri.h"
|
||||
#include "SComponent/c_sxyz.h"
|
||||
#include "SComponent/c_xyz.h"
|
||||
#include "global.h"
|
||||
|
||||
extern f32 lbl_80455118; // SComponent::@2256, 0.0
|
||||
extern f32 lbl_80455138; // SComponent::@2273, 1.0
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
/* c_m3d_g_lin.cpp autogenerated by split.py v0.3 at 2021-01-01 14:48:45.519641 */
|
||||
|
||||
#include "SComponent/c_m3d.h"
|
||||
#include "SComponent/c_m3d_g_lin.h"
|
||||
#include "mtx_vec.h"
|
||||
|
||||
// __ct__8cM3dGLinFRC4cXyzRC4cXyz
|
||||
cM3dGLin::cM3dGLin(const cXyz& pStart, const cXyz& pEnd) : mStart(pStart), mEnd(pEnd) {}
|
||||
|
|
Loading…
Reference in New Issue