clang: constructor initialization order

while not a major issue per-se, the sheer number of times the engine has to jump back in memory and backfill data in a given class can add up. First run of... many.,
This commit is contained in:
Azaezel 2016-10-14 18:16:55 -05:00
parent 1131ed15df
commit fbfd3ed8ed
64 changed files with 260 additions and 255 deletions

View file

@ -46,9 +46,9 @@ struct PhysicsState
momentum( Point3F::Zero ),
orientation( QuatF::Identity ),
angularMomentum( Point3F::Zero ),
sleeping( false ),
linVelocity( Point3F::Zero ),
angVelocity( Point3F::Zero ),
sleeping( false )
angVelocity( Point3F::Zero )
{
}

View file

@ -312,11 +312,11 @@ PhysicsDebris* PhysicsDebris::create( PhysicsDebrisData *datablock,
}
PhysicsDebris::PhysicsDebris()
: mDataBlock( NULL ),
mLifetime( 0.0f ),
: mLifetime( 0.0f ),
mInitialLinVel( Point3F::Zero ),
mDataBlock( NULL ),
mShapeInstance( NULL ),
mWorld( NULL ),
mInitialLinVel( Point3F::Zero )
mWorld( NULL )
{
mTypeMask |= DebrisObjectType | DynamicShapeObjectType;

View file

@ -41,9 +41,10 @@ ConsoleDocClass( PhysicsForce,
PhysicsForce::PhysicsForce()
: mWorld( NULL ),
mBody( NULL ),
mPhysicsTick( false )
:
mWorld( NULL ),
mPhysicsTick( false ),
mBody( NULL )
{
}

View file

@ -401,12 +401,12 @@ ConsoleDocClass( PhysicsShape,
PhysicsShape::PhysicsShape()
: mPhysicsRep( NULL ),
mWorld( NULL ),
mShapeInst( NULL ),
mResetPos( MatrixF::Identity ),
mShapeInst( NULL ),
mDestroyed( false ),
mPlayAmbient( false ),
mAmbientThread( NULL ),
mAmbientSeq( -1 )
mAmbientSeq( -1 ),
mAmbientThread( NULL )
{
mNetFlags.set( Ghostable | ScopeAlways );
mTypeMask |= DynamicShapeObjectType;

View file

@ -55,11 +55,12 @@ public:
/// The constructor.
PhysicsUserData()
: mObject( NULL ),
:
#ifdef TORQUE_DEBUG
mTypeId( smTypeName ),
#endif
mObject( NULL ),
mBody( NULL )
#ifdef TORQUE_DEBUG
, mTypeId( smTypeName )
#endif
{}
/// The destructor.
@ -117,4 +118,4 @@ protected:
PhysicsBody *mBody;
};
#endif // _PHYSICS_PHYSICSUSERDATA_H_
#endif // _PHYSICS_PHYSICSUSERDATA_H_