Skip to content

Commit

Permalink
fix: Fix -Wreorder warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
SCell555 committed Oct 26, 2023
1 parent 154b347 commit 1e3e0dd
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions vphysics_jolt/vjolt_constraints.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,13 +76,13 @@ void JoltPhysicsConstraintGroup::RemoveConstraint( JoltPhysicsConstraint *pConst
//-------------------------------------------------------------------------------------------------

JoltPhysicsConstraint::JoltPhysicsConstraint( JoltPhysicsEnvironment *pPhysicsEnvironment, IPhysicsObject *pReferenceObject, IPhysicsObject *pAttachedObject, constraintType_t Type, JPH::Constraint* pConstraint, void *pGameData )
: m_pPhysicsEnvironment( pPhysicsEnvironment )
, m_pPhysicsSystem( pPhysicsEnvironment->GetPhysicsSystem() )
, m_pObjReference( static_cast<JoltPhysicsObject*>( pReferenceObject ) )
: m_pObjReference( static_cast<JoltPhysicsObject*>( pReferenceObject ) )
, m_pObjAttached( static_cast<JoltPhysicsObject*>( pAttachedObject ) )
, m_ConstraintType( Type )
, m_pConstraint( pConstraint )
, m_ConstraintType( Type )
, m_pGameData( pGameData )
, m_pPhysicsEnvironment( pPhysicsEnvironment )
, m_pPhysicsSystem( pPhysicsEnvironment->GetPhysicsSystem() )
{
m_pObjReference->AddDestroyedListener( this );
m_pObjAttached->AddDestroyedListener( this );
Expand Down
2 changes: 1 addition & 1 deletion vphysics_jolt/vjolt_controller_vehicle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ JoltPhysicsVehicleController::JoltPhysicsVehicleController( JoltPhysicsEnvironme
: m_pEnvironment( pEnvironment )
, m_pPhysicsSystem( pPhysicsSystem )
, m_pCarBodyObject( pVehicleBodyObject )
, m_VehicleType( nVehicleType )
, m_VehicleParams( params )
, m_VehicleType( nVehicleType )
{
JPH::VehicleConstraintSettings vehicle;
vehicle.mUp = VehicleUpVector;
Expand Down
16 changes: 8 additions & 8 deletions vphysics_jolt/vjolt_object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@
//-------------------------------------------------------------------------------------------------

JoltPhysicsObject::JoltPhysicsObject( JPH::Body *pBody, JoltPhysicsEnvironment *pEnvironment, bool bStatic, int nMaterialIndex, const objectparams_t *pParams )
: m_pBody( pBody )
, m_pEnvironment( pEnvironment )
, m_pPhysicsSystem( pEnvironment->GetPhysicsSystem() )
: m_pGameData( pParams->pGameData )
, m_pName( pParams->pName )
, m_bStatic( bStatic )
, m_materialIndex( Max( nMaterialIndex, 0 ) ) // Sometimes we get passed -1.
, m_flCachedMass( pParams->mass )
, m_flCachedInvMass( m_flCachedMass ? 1.0f / m_flCachedMass : 0.0f )
, m_pGameData( pParams->pGameData )
, m_materialIndex( Max( nMaterialIndex, 0 ) ) // Sometimes we get passed -1.
, m_flVolume( pParams->volume )
, m_pName( pParams->pName )
, m_pBody( pBody )
, m_pEnvironment( pEnvironment )
, m_pPhysicsSystem( pEnvironment->GetPhysicsSystem() )
{
// Josh:
// Assert that m_pGameData is the first element, some games
Expand All @@ -52,10 +52,10 @@ JoltPhysicsObject::JoltPhysicsObject( JPH::Body *pBody, JoltPhysicsEnvironment *
}

JoltPhysicsObject::JoltPhysicsObject( JPH::Body *pBody, JoltPhysicsEnvironment *pEnvironment, void *pGameData, JPH::StateRecorder &recorder )
: m_pBody( pBody )
: m_pGameData( pGameData )
, m_pBody( pBody )
, m_pEnvironment( pEnvironment )
, m_pPhysicsSystem( pEnvironment->GetPhysicsSystem() )
, m_pGameData( pGameData )
{
RestoreObjectState( recorder );
}
Expand Down

0 comments on commit 1e3e0dd

Please sign in to comment.