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

@ -91,9 +91,9 @@ ConsoleSetType(TypeComponentAssetPtr)
//-----------------------------------------------------------------------------
ComponentAsset::ComponentAsset() :
mAcquireReferenceCount(0),
mpOwningAssetManager(NULL),
mAssetInitialized(false)
mAssetInitialized(false),
mAcquireReferenceCount(0)
{
// Generate an asset definition.
mpAssetDefinition = new AssetDefinition();

View file

@ -91,9 +91,9 @@ ConsoleSetType(TypeExampleAssetPtr)
//-----------------------------------------------------------------------------
ExampleAsset::ExampleAsset() :
mAcquireReferenceCount(0),
mpOwningAssetManager(NULL),
mAssetInitialized(false)
mAssetInitialized(false),
mAcquireReferenceCount(0)
{
// Generate an asset definition.
mpAssetDefinition = new AssetDefinition();

View file

@ -91,9 +91,9 @@ ConsoleSetType(TypeGameObjectAssetPtr)
//-----------------------------------------------------------------------------
GameObjectAsset::GameObjectAsset() :
mAcquireReferenceCount(0),
mpOwningAssetManager(NULL),
mAssetInitialized(false)
mAssetInitialized(false),
mAcquireReferenceCount(0)
{
// Generate an asset definition.
mpAssetDefinition = new AssetDefinition();

View file

@ -96,9 +96,9 @@ ConsoleSetType(TypeShapeAssetPtr)
//-----------------------------------------------------------------------------
ShapeAsset::ShapeAsset() :
mAcquireReferenceCount(0),
mpOwningAssetManager(NULL),
mAssetInitialized(false)
mAssetInitialized(false),
mAcquireReferenceCount(0)
{
}

View file

@ -39,14 +39,14 @@ class WaterObject;
struct ContainerQueryInfo
{
ContainerQueryInfo()
: waterCoverage(0.0f),
: box(-1,-1,-1,1,1,1),
mass(1.0f),
waterCoverage(0.0f),
waterHeight(0.0f),
waterDensity(0.0f),
waterViscosity(0.0f),
gravityScale(1.0f),
appliedForce(0,0,0),
box(-1,-1,-1,1,1,1),
mass(1.0f),
waterObject(NULL)
{
}

View file

@ -227,12 +227,12 @@ bool ConvexShape::protectedSetSurface( void *object, const char *index, const ch
ConvexShape::ConvexShape()
: mMaterialInst( NULL ),
mNormalLength( 0.3f ),
: mMaterialName( "Grid512_OrangeLines_Mat" ),
mMaterialInst( NULL ),
mVertCount( 0 ),
mPrimCount( 0 ),
mMaterialName( "Grid512_OrangeLines_Mat" ),
mPhysicsRep( NULL )
mPhysicsRep( NULL ),
mNormalLength( 0.3f )
{
mNetFlags.set( Ghostable | ScopeAlways );

View file

@ -60,14 +60,14 @@ GFXImplementVertexFormat( GCVertex )
};
GroundCoverShaderConstHandles::GroundCoverShaderConstHandles()
: mTypeRectsSC( NULL ),
: mGroundCover( NULL ),
mTypeRectsSC( NULL ),
mFadeSC( NULL ),
mWindDirSC( NULL ),
mGustInfoSC( NULL ),
mTurbInfoSC( NULL ),
mCamRightSC( NULL ),
mCamUpSC( NULL ),
mGroundCover( NULL )
mCamUpSC( NULL )
{
}

View file

@ -69,9 +69,9 @@ GroundPlane::GroundPlane()
mScaleU( 1.0f ),
mScaleV( 1.0f ),
mMaterial( NULL ),
mPhysicsRep( NULL ),
mMin( 0.0f, 0.0f ),
mMax( 0.0f, 0.0f ),
mPhysicsRep( NULL )
mMax( 0.0f, 0.0f )
{
mTypeMask |= StaticObjectType | StaticShapeObjectType;
mNetFlags.set( Ghostable | ScopeAlways );

View file

@ -36,15 +36,15 @@
// GuiMaterialPreview
GuiMaterialPreview::GuiMaterialPreview()
: mMaxOrbitDist(5.0f),
mMinOrbitDist(0.0f),
mOrbitDist(5.0f),
mMouseState(None),
: mMouseState(None),
mModel(NULL),
mLastMousePoint(0, 0),
lastRenderTime(0),
runThread(0),
mFakeSun(NULL)
lastRenderTime(0),
mLastMousePoint(0, 0),
mFakeSun(NULL),
mMaxOrbitDist(5.0f),
mMinOrbitDist(0.0f),
mOrbitDist(5.0f)
{
mActive = true;
mCameraMatrix.identity();

View file

@ -89,21 +89,21 @@ IMPLEMENT_CALLBACK( GuiObjectView, onMouseLeave, void, (),(),
//------------------------------------------------------------------------------
GuiObjectView::GuiObjectView()
: mMaxOrbitDist( 5.0f ),
mMinOrbitDist( 0.0f ),
mOrbitDist( 5.0f ),
mMouseState( None ),
mModel( NULL ),
mMountedModel( NULL ),
: mMouseState( None ),
mLastMousePoint( 0, 0 ),
mLastRenderTime( 0 ),
mRunThread( NULL ),
mLight( NULL ),
mAnimationSeq( -1 ),
mMountNodeName( "mount0" ),
mMountNode( -1 ),
mModel( NULL ),
mMaxOrbitDist( 5.0f ),
mMinOrbitDist( 0.0f ),
mCameraRotation( 0.0f, 0.0f, 0.0f ),
mOrbitDist( 5.0f ),
mCameraSpeed( 0.01f ),
mCameraRotation( 0.0f, 0.0f, 0.0f ),
mMountNode( -1 ),
mMountNodeName( "mount0" ),
mMountedModel( NULL ),
mAnimationSeq( -1 ),
mRunThread( NULL ),
mLastRenderTime( 0 ),
mLight( NULL ),
mLightColor( 1.0f, 1.0f, 1.0f ),
mLightAmbient( 0.5f, 0.5f, 0.5f ),
mLightDirection( 0.f, 0.707f, -0.707f )

View file

@ -79,16 +79,16 @@ static SFXAmbience sDefaultAmbience;
//-----------------------------------------------------------------------------
LevelInfo::LevelInfo()
: mNearClip( 0.1f ),
: mWorldSize( 10000.0f ),
mNearClip( 0.1f ),
mVisibleDistance( 1000.0f ),
mVisibleGhostDistance ( 0 ),
mDecalBias( 0.0015f ),
mCanvasClearColor( 255, 0, 255, 255 ),
mAmbientLightBlendPhase( 1.f ),
mSoundAmbience( NULL ),
mSoundscape( NULL ),
mSoundDistanceModel( SFXDistanceModelLinear ),
mWorldSize( 10000.0f ),
mAmbientLightBlendPhase( 1.f )
mSoundscape( NULL )
{
mFogData.density = 0.0f;
mFogData.densityOffset = 0.0f;

View file

@ -118,11 +118,11 @@ ConsoleDocClass( LightFlareData,
);
LightFlareData::LightFlareData()
: mFlareEnabled( true ),
mElementCount( 0 ),
mScale( 1.0f ),
: mScale( 1.0f ),
mFlareEnabled( true ),
mOcclusionRadius( 0.0f ),
mRenderReflectPass( true )
mRenderReflectPass( true ),
mElementCount( 0 )
{
dMemset( mElementRect, 0, sizeof( RectF ) * MAX_ELEMENTS );
dMemset( mElementScale, 0, sizeof( F32 ) * MAX_ELEMENTS );

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_

View file

@ -551,14 +551,14 @@ S32 ProjectileData::scaleValue( S32 value, bool down )
Projectile::Projectile()
: mPhysicsWorld( NULL ),
mDataBlock( NULL ),
mParticleEmitter( NULL ),
mParticleWaterEmitter( NULL ),
mSound( NULL ),
mCurrPosition( 0, 0, 0 ),
mCurrVelocity( 0, 0, 1 ),
mSourceObjectId( -1 ),
mSourceObjectSlot( -1 ),
mCurrTick( 0 ),
mParticleEmitter( NULL ),
mParticleWaterEmitter( NULL ),
mSound( NULL ),
mProjectileShape( NULL ),
mActivateThread( NULL ),
mMaintainThread( NULL ),

View file

@ -95,9 +95,9 @@ SFXEmitter::SFXEmitter()
: SceneObject(),
mSource( NULL ),
mTrack( NULL ),
mUseTrackDescriptionOnly( false ),
mLocalProfile( &mDescription ),
mPlayOnAdd( true ),
mUseTrackDescriptionOnly( false )
mPlayOnAdd( true )
{
mTypeMask |= MarkerObjectType;
mNetFlags.set( Ghostable | ScopeAlways );

View file

@ -168,12 +168,9 @@ ShapeBaseData::ShapeBaseData()
density( 1.0f ),
maxEnergy( 0.0f ),
maxDamage( 1.0f ),
destroyedLevel( 1.0f ),
disabledLevel( 1.0f ),
repairRate( 0.0033f ),
eyeNode( -1 ),
earNode( -1 ),
cameraNode( -1 ),
disabledLevel( 1.0f ),
destroyedLevel( 1.0f ),
cameraMaxDist( 0.0f ),
cameraMinDist( 0.2f ),
cameraDefaultFov( 75.0f ),
@ -181,6 +178,11 @@ ShapeBaseData::ShapeBaseData()
cameraMaxFov( 120.f ),
cameraCanBank( false ),
mountedImagesBank( false ),
mCRC( 0 ),
computeCRC( false ),
eyeNode( -1 ),
earNode( -1 ),
cameraNode( -1 ),
debrisDetail( -1 ),
damageSequence( -1 ),
hulkSequence( -1 ),
@ -189,9 +191,7 @@ ShapeBaseData::ShapeBaseData()
useEyePoint( false ),
isInvincible( false ),
renderWhenDestroyed( true ),
computeCRC( false ),
inheritEnergyFromMount( false ),
mCRC( 0 )
inheritEnergyFromMount( false )
{
dMemset( mountPointNode, -1, sizeof( S32 ) * SceneObject::NumMountPoints );
}

View file

@ -87,9 +87,9 @@ class OptimizedPolyList : public AbstractPolyList
Poly()
: plane( -1 ),
object( NULL ),
vertexCount( 0 ),
material( NULL ),
vertexCount( 0 ),
object( NULL ),
type( TriangleFan )
{
}

View file

@ -36,8 +36,8 @@ static VectorPtr< ConsoleBaseType* > gConsoleTypeTable( __FILE__, __LINE__ );
//-----------------------------------------------------------------------------
ConsoleBaseType::ConsoleBaseType( const S32 size, S32 *idPtr, const char *aTypeName )
: mInspectorFieldType( NULL ),
mTypeSize( size ),
: mTypeSize( size ),
mInspectorFieldType( NULL ),
mTypeInfo( NULL )
{
mTypeName = StringTable->insert( aTypeName );

View file

@ -43,13 +43,13 @@ EngineFunctionInfo::EngineFunctionInfo( const char* name,
void* address,
U32 flags )
: SuperType( name, EngineExportKindFunction, scope, docString ),
mBindingName( bindingName ),
mFunctionFlags( flags ),
mFunctionType( functionType ),
mDefaultArgumentValues( defaultArgs ),
mFunctionFlags( flags ),
mBindingName( bindingName ),
mPrototypeString( prototypeString ),
mNextFunction( smFirstFunction ),
mAddress( address )
mAddress( address ),
mNextFunction( smFirstFunction )
{
AssertFatal( functionType, "EngineFunctionInfo - Function cannot have void type!" );
smFirstFunction = this;

View file

@ -55,11 +55,11 @@ EngineTypeInfo::EngineTypeInfo( const char* typeName, EngineExportScope* scope,
: SuperType( typeName, scope, docString ),
mTypeKind( kind ),
mInstanceSize( instanceSize ),
mNext( smFirst ),
mEnumTable( NULL ),
mFieldTable( NULL ),
mPropertyTable( NULL ),
mSuperType( NULL )
mSuperType( NULL ),
mNext( smFirst )
{
mExportKind = EngineExportKindType;

View file

@ -101,8 +101,8 @@ bool OggDecoder::_nextPacket()
//-----------------------------------------------------------------------------
OggInputStream::OggInputStream( Stream* stream )
: mStream( stream ),
mIsAtEnd( false )
: mIsAtEnd( false ),
mStream( stream )
{
ogg_sync_init( &mOggSyncState );

View file

@ -95,12 +95,12 @@ static inline S32 sampleG( U8* pCb, U8* pCr )
OggTheoraDecoder::OggTheoraDecoder( const ThreadSafeRef< OggInputStream >& stream )
: Parent( stream ),
#ifdef TORQUE_DEBUG
mLock( 0 ),
#endif
mTheoraSetup( NULL ),
mTheoraDecoder( NULL ),
mTranscoder( TRANSCODER_Auto )
#ifdef TORQUE_DEBUG
,mLock( 0 )
#endif
{
// Initialize.

View file

@ -41,7 +41,7 @@ protected:
StrTest() : mData( 0 ), mUTF16( 0 ), mLength( 0 ) {}
StrTest( const char* str )
: mData( str ), mLength( str ? dStrlen( str ) : 0 ), mUTF16( NULL )
: mData( str ), mUTF16( NULL ), mLength( str ? dStrlen( str ) : 0 )
{
if( str )
mUTF16 = createUTF16string( mData );

View file

@ -272,11 +272,11 @@ SimObjectPtr<SimSet> DecalRoad::smServerDecalRoadSet = NULL;
// Constructors
DecalRoad::DecalRoad()
: mLoadRenderData( true ),
mBreakAngle( 3.0f ),
: mBreakAngle( 3.0f ),
mSegmentsPerBatch( 10 ),
mTextureLength( 5.0f ),
mRenderPriority( 10 ),
mLoadRenderData( true ),
mMaterial( NULL ),
mMatInst( NULL ),
mUpdateEventId( -1 ),

View file

@ -59,29 +59,28 @@ GuiMeshRoadEditorCtrl::GuiMeshRoadEditorCtrl()
// tool palette
mSelectMeshRoadMode("MeshRoadEditorSelectMode"),
mAddMeshRoadMode("MeshRoadEditorAddRoadMode"),
mMovePointMode("MeshRoadEditorMoveMode"),
mRotatePointMode("MeshRoadEditorRotateMode"),
mScalePointMode("MeshRoadEditorScaleMode"),
mAddNodeMode("MeshRoadEditorAddNodeMode"),
mInsertPointMode("MeshRoadEditorInsertPointMode"),
mRemovePointMode("MeshRoadEditorRemovePointMode"),
mMode(mSelectMeshRoadMode),
mHasCopied( false ),
mIsDirty( false ),
mRoadSet( NULL ),
mSelNode( -1 ),
mSelRoad( NULL ),
mHoverRoad( NULL ),
mHoverNode( -1 ),
mDefaultWidth( 10.0f ),
mDefaultDepth( 5.0f ),
mDefaultNormal( 0,0,1 ),
mAddNodeIdx( 0 ),
mNodeHalfSize( 4,4 ),
mHoverSplineColor( 255,0,0,255 ),
mSelectedSplineColor( 0,255,0,255 ),
mHoverNodeColor( 255,255,255,255 )
mMovePointMode("MeshRoadEditorMoveMode"),
mScalePointMode("MeshRoadEditorScaleMode"),
mRotatePointMode("MeshRoadEditorRotateMode"),
mIsDirty( false ),
mRoadSet( NULL ),
mSelNode( -1 ),
mHoverNode( -1 ),
mAddNodeIdx( 0 ),
mSelRoad( NULL ),
mHoverRoad( NULL ),
mMode(mSelectMeshRoadMode),
mDefaultWidth( 10.0f ),
mDefaultDepth( 5.0f ),
mDefaultNormal( 0,0,1 ),
mNodeHalfSize( 4,4 ),
mHoverSplineColor( 255,0,0,255 ),
mSelectedSplineColor( 0,255,0,255 ),
mHoverNodeColor( 255,255,255,255 ),
mHasCopied( false )
{
mMaterialName[Top] = StringTable->insert("DefaultRoadMaterialTop");
mMaterialName[Bottom] = StringTable->insert("DefaultRoadMaterialOther");

View file

@ -52,9 +52,9 @@ ConsoleDocClass( GuiRiverEditorCtrl,
);
GuiRiverEditorCtrl::GuiRiverEditorCtrl()
: mDefaultNormal( 0, 0, 1 ),
mDefaultWidth( 10.0f ),
mDefaultDepth( 5.0f )
: mDefaultWidth( 10.0f ),
mDefaultDepth( 5.0f ),
mDefaultNormal( 0, 0, 1 )
{
// Each of the mode names directly correlates with the River Editor's
// tool palette

View file

@ -593,14 +593,14 @@ IMPLEMENT_CO_NETOBJECT_V1(River);
River::River()
: mMetersPerSegment(10.0f),
mSegmentsPerBatch(10),
: mSegmentsPerBatch(10),
mMetersPerSegment(10.0f),
mDepthScale(1.0f),
mFlowMagnitude(1.0f),
mLodDistance( 50.0f ),
mMaxDivisionSize(2.5f),
mMinDivisionSize(0.25f),
mColumnCount(5),
mFlowMagnitude(1.0f),
mLodDistance( 50.0f )
mColumnCount(5)
{
mNetFlags.set( Ghostable | ScopeAlways );

View file

@ -179,23 +179,24 @@ ConsoleDocClass( WaterObject,
WaterObject::WaterObject()
: mViscosity( 1.0f ),
mDensity( 1.0f ),
mReflectivity( 0.5f ),
mReflectNormalUp( true ),
mLiquidType( "Water" ),
mFresnelBias( 0.3f ),
mFresnelPower( 6.0f ),
mReflectNormalUp( true ),
mReflectivity( 0.5f ),
mDistortStartDist( 0.1f ),
mDistortEndDist( 20.0f ),
mDistortFullDepth( 3.5f ),
mUndulateMaxDist(50.0f),
mOverallFoamOpacity( 1.0f ),
mFoamMaxDepth( 2.0f ),
mFoamAmbientLerp( 0.5f ),
mFoamRippleInfluence( 0.05f ),
mUnderwaterPostFx( NULL ),
mLiquidType( "Water" ),
mFresnelBias( 0.3f ),
mFresnelPower( 6.0f ),
mClarity( 0.5f ),
mBasicLighting( false ),
mUnderwaterColor(9, 6, 5, 240),
mUndulateMaxDist(50.0f),
mMiscParamW( 0.0f ),
mUnderwaterPostFx( NULL ),
mBasicLighting( false ),
mOverallWaveMagnitude( 1.0f ),
mOverallRippleMagnitude( 0.1f ),
mCubemap( NULL ),
@ -203,8 +204,7 @@ WaterObject::WaterObject()
mSpecularPower( 48.0f ),
mSpecularColor( 1.0f, 1.0f, 1.0f, 1.0f ),
mDepthGradientMax( 50.0f ),
mEmissive( false ),
mUnderwaterColor(9, 6, 5, 240)
mEmissive( false )
{
mTypeMask = WaterObjectType;

View file

@ -49,8 +49,8 @@ ForestBrushElement::ForestBrushElement()
mSinkMin( 0.0f ),
mSinkMax( 0.0f ),
mSinkRadius( 1 ),
mSlopeMax( 90.0f ),
mSlopeMin( 0.0f ),
mSlopeMax( 90.0f ),
mElevationMin( -10000.0f ),
mElevationMax( 10000.0f )
{

View file

@ -78,16 +78,16 @@ EndImplementEnumType;
ForestBrushTool::ForestBrushTool()
: mSize( 5.0f ),
: mRandom( Platform::getRealMilliseconds() + 1 ),
mSize( 5.0f ),
mPressure( 0.1f ),
mHardness( 1.0f ),
mDrawBrush( false ),
mCurrAction( NULL ),
mStrokeEvent( 0 ),
mBrushDown( false ),
mColor( ColorI::WHITE ),
mMode( Paint ),
mRandom( Platform::getRealMilliseconds() + 1 )
mColor( ColorI::WHITE ),
mBrushDown( false ),
mDrawBrush( false ),
mStrokeEvent( 0 ),
mCurrAction( NULL )
{
}

View file

@ -31,8 +31,8 @@ ForestUndoAction::ForestUndoAction( const Resource<ForestData> &data,
ForestEditorCtrl *editor,
const char *description )
: UndoAction( description ),
mData( data ),
mEditor( editor )
mEditor( editor ),
mData( data )
{
}

View file

@ -88,7 +88,7 @@ class GFXOcclusionQueryHandle
public:
GFXOcclusionQueryHandle()
: mLastStatus(GFXOcclusionQuery::Unset), mLastData(0), mQuery(NULL), mWaiting(false)
: mLastStatus(GFXOcclusionQuery::Unset), mLastData(0), mWaiting(false) , mQuery(NULL)
{}
~GFXOcclusionQueryHandle()

View file

@ -64,11 +64,11 @@ public:
const GFXVertexFormat *vertexFormat,
U32 vertexSize,
GFXBufferType bufferType )
: mDevice( device ),
mVolatileStart( 0 ),
mNumVerts( numVerts ),
: mNumVerts( numVerts ),
mVertexSize( vertexSize ),
mBufferType( bufferType )
mBufferType( bufferType ),
mDevice( device ),
mVolatileStart( 0 )
{
if ( vertexFormat )
{

View file

@ -175,8 +175,10 @@ void GFXGLDevice::initGLState()
GFXGLDevice::GFXGLDevice(U32 adapterIndex) :
mAdapterIndex(adapterIndex),
mNeedUpdateVertexAttrib(false),
mCurrentPB(NULL),
mDrawInstancesCount(0),
mCurrentShader( NULL ),
m_mCurrentWorld(true),
m_mCurrentView(true),
mContext(NULL),
@ -186,8 +188,6 @@ GFXGLDevice::GFXGLDevice(U32 adapterIndex) :
mMaxFFTextures(2),
mMaxTRColors(1),
mClip(0, 0, 0, 0),
mCurrentShader( NULL ),
mNeedUpdateVertexAttrib(false),
mWindowRT(NULL),
mUseGlMap(true)
{

View file

@ -58,7 +58,7 @@ public:
glGenQueries(1, &mQueryId);
}
GLTimer() : mName(NULL), mQueryId(0), mData(NULL)
GLTimer() : mName(NULL), mData(NULL), mQueryId(0)
{
}

View file

@ -41,10 +41,11 @@ GFXGLVertexBuffer::GFXGLVertexBuffer( GFXDevice *device,
const GFXVertexFormat *vertexFormat,
U32 vertexSize,
GFXBufferType bufferType )
: GFXVertexBuffer( device, numVerts, vertexFormat, vertexSize, bufferType ),
mZombieCache(NULL),
: GFXVertexBuffer( device, numVerts, vertexFormat, vertexSize, bufferType ),
mBufferOffset(0),
mBufferVertexOffset(0)
mBufferVertexOffset(0),
mZombieCache(NULL)
{
if( mBufferType == GFXBufferTypeVolatile )
{

View file

@ -58,8 +58,8 @@ ConsoleDocClass( GuiBitmapCtrl,
GuiBitmapCtrl::GuiBitmapCtrl(void)
: mBitmapName(),
mStartPoint( 0, 0 ),
mWrap( false ),
mColor(ColorI::WHITE)
mColor(ColorI::WHITE),
mWrap( false )
{
}

View file

@ -198,22 +198,22 @@ EndImplementEnumType;
//-----------------------------------------------------------------------------
GuiControl::GuiControl() : mAddGroup( NULL ),
mLayer(0),
mBounds(0,0,64,64),
mMinExtent(8,2),
mProfile(NULL),
mLangTable(NULL),
mFirstResponder(NULL),
mTooltipProfile(NULL),
mTipHoverTime(1000),
mVisible(true),
mActive(true),
mAwake(false),
mHorizSizing(horizResizeRight),
mVertSizing(vertResizeBottom),
mTooltipProfile(NULL),
mTipHoverTime(1000),
mIsContainer(false),
mCanResize(true),
mCanHit( true )
mCanResize(true),
mCanHit( true ),
mLayer(0),
mMinExtent(8,2),
mLangTable(NULL),
mFirstResponder(NULL),
mHorizSizing(horizResizeRight),
mVertSizing(vertResizeBottom)
{
mConsoleVariable = StringTable->EmptyString();
mAcceleratorKey = StringTable->EmptyString();

View file

@ -1263,9 +1263,9 @@ void GuiInspectorTypeS32::setValue( StringTableEntry newValue )
//-----------------------------------------------------------------------------
GuiInspectorTypeBitMask32::GuiInspectorTypeBitMask32()
: mRollout( NULL ),
mArrayCtrl( NULL ),
mHelper( NULL )
: mHelper( NULL ),
mRollout( NULL ),
mArrayCtrl( NULL )
{
}

View file

@ -145,8 +145,8 @@ S32 CreatorTree::Node::getSelected()
//------------------------------------------------------------------------------
CreatorTree::CreatorTree() :
mCurId(0),
mTxtOffset(5),
mRoot(0)
mRoot(0),
mTxtOffset(5)
{
VECTOR_SET_ASSOCIATION(mNodeList);
clear();

View file

@ -35,9 +35,9 @@ MODULE_END;
LightInfoExType LightMapParams::Type( "" );
LightMapParams::LightMapParams( LightInfo *light ) :
representedInLightmap(false),
includeLightmappedGeometryInShadow(false),
shadowDarkenColor(0.0f, 0.0f, 0.0f, -1.0f)
representedInLightmap(false),
shadowDarkenColor(0.0f, 0.0f, 0.0f, -1.0f),
includeLightmappedGeometryInShadow(false)
{
}

View file

@ -80,8 +80,8 @@ struct SilhouetteExtractorBasePerspective : public SilhouetteExtractorBase< Poly
SilhouetteExtractorBasePerspective( const Polyhedron& polyhedron )
: SilhouetteExtractorBase< Polyhedron >( polyhedron ),
mWaterMark( 0 ),
mPolygonOrientations( NULL ) {}
mPolygonOrientations( NULL ),
mWaterMark( 0 ) {}
/// Initialize extraction.
///

View file

@ -108,17 +108,17 @@ SceneManager* gServerSceneGraph = NULL;
//-----------------------------------------------------------------------------
SceneManager::SceneManager( bool isClient )
: mLightManager( NULL ),
mCurrentRenderState( NULL ),
mIsClient( isClient ),
: mIsClient( isClient ),
mZoneManager( NULL ),
mUsePostEffectFog( true ),
mDisplayTargetResolution( 0, 0 ),
mDefaultRenderPass( NULL ),
mCurrentRenderState( NULL ),
mVisibleDistance( 500.f ),
mVisibleGhostDistance( 0 ),
mNearClip( 0.1f ),
mLightManager( NULL ),
mAmbientLightColor( ColorF( 0.1f, 0.1f, 0.1f, 1.0f ) ),
mZoneManager( NULL )
mDefaultRenderPass( NULL )
{
VECTOR_SET_ASSOCIATION( mBatchQueryList );

View file

@ -69,10 +69,10 @@ SFXALVoice::SFXALVoice( const OPENALFNTABLE &oalft,
ALuint sourceName )
: Parent( buffer ),
mOpenAL( oalft ),
mResumeAtSampleOffset( -1.0f ),
mSourceName( sourceName ),
mSampleOffset( 0 )
mResumeAtSampleOffset( -1.0f ),
mSampleOffset( 0 ),
mOpenAL( oalft )
{
AL_SANITY_CHECK();
}

View file

@ -36,13 +36,13 @@ Signal< void( SFXBuffer* ) > SFXBuffer::smBufferDestroyedSignal;
SFXBuffer::SFXBuffer( const ThreadSafeRef< SFXStream >& stream, SFXDescription* description, bool createAsyncState )
: mStatus( STATUS_Null ),
mIsStreaming( description->mIsStreaming ),
mFormat( stream->getFormat() ),
mDuration( stream->getDuration() ),
mUniqueVoice( NULL ),
mIsDead( false ),
mIsStreaming( description->mIsStreaming ),
mIsLooping( description->mIsLooping ),
mIsUnique( description->mIsStreaming )
mIsUnique( description->mIsStreaming ),
mIsDead( false ),
mUniqueVoice( NULL )
{
using namespace SFXInternal;
@ -63,12 +63,12 @@ SFXBuffer::SFXBuffer( const ThreadSafeRef< SFXStream >& stream, SFXDescription*
SFXBuffer::SFXBuffer( SFXDescription* description )
: mStatus( STATUS_Ready ),
mIsStreaming( false ), // Not streaming through our system.
mDuration( 0 ), // Must be set by subclass.
mUniqueVoice( NULL ),
mIsDead( false ),
mIsStreaming( false ), // Not streaming through our system.
mIsLooping( description->mIsLooping ),
mIsUnique( false ) // Must be set by subclass.
mIsUnique( false ), // Must be set by subclass.
mIsDead( false ),
mUniqueVoice( NULL )
{
}

View file

@ -191,9 +191,7 @@ SFXSource::SFXSource()
: mStatus( SFXStatusStopped ),
mSavedStatus( SFXStatusNull ),
mStatusCallback( NULL ),
mPitch( 1.f ),
mModulativePitch( 1.f ),
mEffectivePitch( 1.f ),
mDescription( NULL ),
mVolume( 1.f ),
mPreFadeVolume( 1.f ),
mFadedVolume( 1.f ),
@ -203,26 +201,28 @@ SFXSource::SFXSource()
mPriority( 0 ),
mModulativePriority( 1.f ),
mEffectivePriority( 0 ),
mVelocity( 0, 0, 0 ),
mPitch( 1.f ),
mModulativePitch( 1.f ),
mEffectivePitch( 1.f ),
mTransform( true ),
mVelocity( 0, 0, 0 ),
mMinDistance( 1 ),
mMaxDistance( 100 ),
mConeInsideAngle( 360 ),
mConeOutsideAngle( 360 ),
mConeOutsideVolume( 1 ),
mDescription( NULL ),
mDistToListener( 0.f ),
mTransformScattered( false ),
mPlayStartTick( 0 ),
mFadeSegmentEase( NULL ),
mFadeInTime( 0.f ),
mFadeOutTime( 0.f ),
mFadeInPoint( -1.f ),
mFadeOutPoint( -1.f ),
mFadeSegmentType( FadeSegmentNone ),
mFadeSegmentEase( NULL ),
mFadeSegmentStartPoint( 0.f ),
mFadeSegmentEndPoint( 0.f ),
mSavedFadeTime( -1.f ),
mDistToListener( 0.f )
mPlayStartTick( 0 )
{
VECTOR_SET_ASSOCIATION( mParameters );
}
@ -232,12 +232,9 @@ SFXSource::SFXSource()
SFXSource::SFXSource( SFXTrack* track, SFXDescription* description )
: mStatus( SFXStatusStopped ),
mSavedStatus( SFXStatusNull ),
mStatusCallback( NULL ),
mTrack( track ),
mDescription( description ),
mStatusCallback( NULL ),
mPitch( 1.f ),
mModulativePitch( 1.f ),
mEffectivePitch( 1.f ),
mVolume( 1.f ),
mPreFadeVolume( 1.f ),
mFadedVolume( 1.f ),
@ -247,25 +244,28 @@ SFXSource::SFXSource( SFXTrack* track, SFXDescription* description )
mPriority( 0 ),
mModulativePriority( 1.f ),
mEffectivePriority( 0 ),
mVelocity( 0, 0, 0 ),
mPitch( 1.f ),
mModulativePitch( 1.f ),
mEffectivePitch( 1.f ),
mTransform( true ),
mVelocity( 0, 0, 0 ),
mMinDistance( 1 ),
mMaxDistance( 100 ),
mConeInsideAngle( 360 ),
mConeOutsideAngle( 360 ),
mConeOutsideVolume( 1 ),
mDistToListener( 0.f ),
mTransformScattered( false ),
mPlayStartTick( 0 ),
mFadeInTime( 0.f ),
mFadeOutTime( 0.f ),
mFadeSegmentEase( NULL ),
mFadeInPoint( -1.f ),
mFadeOutPoint( -1.f ),
mFadeSegmentType( FadeSegmentNone ),
mFadeSegmentEase( NULL ),
mFadeSegmentStartPoint( 0.f ),
mFadeSegmentEndPoint( 0.f ),
mSavedFadeTime( -1.f ),
mDistToListener( 0.f )
mPlayStartTick( 0 )
{
VECTOR_SET_ASSOCIATION( mParameters );

View file

@ -41,8 +41,8 @@ Signal< void( SFXVoice* voice ) > SFXVoice::smVoiceDestroyedSignal;
//-----------------------------------------------------------------------------
SFXVoice::SFXVoice( SFXBuffer* buffer )
: mBuffer( buffer ),
mStatus( SFXStatusNull ),
: mStatus( SFXStatusNull ),
mBuffer( buffer ),
mOffset( 0 )
{
}

View file

@ -49,11 +49,11 @@ const U32 TerrCell::smTriCount = TerrCell::smPBSize / 3; // 33
TerrCell::TerrCell()
: mMaterials( 0 ),
: mTriCount( 0 ),
mHasEmpty( false ),
mMaterial( NULL ),
mIsInteriorOnly( false ),
mTriCount( 0 ),
mHasEmpty( false )
mMaterials( 0 ),
mIsInteriorOnly( false )
{
dMemset( mChildren, 0, sizeof( mChildren ) );
}

View file

@ -69,8 +69,8 @@ Vector<String> _initSamplerNames()
const Vector<String> TerrainCellMaterial::mSamplerNames = _initSamplerNames();
TerrainCellMaterial::TerrainCellMaterial()
: mCurrPass( 0 ),
mTerrain( NULL ),
: mTerrain( NULL ),
mCurrPass( 0 ),
mPrePassMat( NULL ),
mReflectMat( NULL )
{

View file

@ -180,23 +180,23 @@ ImplementEnumType(baseTexFormat,
EndImplementEnumType;
TerrainBlock::TerrainBlock()
: mSquareSize( 1.0f ),
mCastShadows( true ),
mScreenError( 16 ),
mDetailsDirty( false ),
mLayerTexDirty( false ),
mLightMap( NULL ),
: mLightMap( NULL ),
mLightMapSize( 256 ),
mMaxDetailDistance( 0.0f ),
mCell( NULL ),
mCRC( 0 ),
mBaseTexSize( 1024 ),
mBaseTexFormat( TerrainBlock::JPG ),
mBaseMaterial( NULL ),
mDefaultMatInst( NULL ),
mMaxDetailDistance( 0.0f ),
mBaseTexScaleConst( NULL ),
mBaseTexIdConst( NULL ),
mDetailsDirty( false ),
mLayerTexDirty( false ),
mBaseTexSize( 1024 ),
mBaseTexFormat( TerrainBlock::JPG ),
mCell( NULL ),
mBaseMaterial( NULL ),
mDefaultMatInst( NULL ),
mSquareSize( 1.0f ),
mPhysicsRep( NULL ),
mScreenError( 16 ),
mCastShadows( true ),
mZoningDirty( false )
{
mTypeMask = TerrainObjectType | StaticObjectType | StaticShapeObjectType;

View file

@ -45,9 +45,9 @@ template<> ResourceBase::Signature Resource<TerrainFile>::signature()
TerrainFile::TerrainFile()
: mNeedsResaving( false ),
: mSize( 256 ),
mFileVersion( FILE_VERSION ),
mSize( 256 )
mNeedsResaving( false )
{
mLayerMap.setSize( mSize * mSize );
dMemset( mLayerMap.address(), 0, mLayerMap.memSize() );

View file

@ -57,11 +57,11 @@ ConsoleDocClass( TerrainMaterial,
"@ingroup enviroMisc\n");
TerrainMaterial::TerrainMaterial()
: mSideProjection( false ),
mDiffuseSize( 500.0f ),
: mDiffuseSize( 500.0f ),
mDetailSize( 5.0f ),
mDetailStrength( 1.0f ),
mDetailDistance( 50.0f ),
mSideProjection( false ),
mMacroSize( 200.0f ),
mMacroStrength( 0.7f ),
mMacroDistance( 500.0f ),

View file

@ -317,7 +317,7 @@ public:
//------------------------------------------------------------------------------
ColladaAppMesh::ColladaAppMesh(const domInstance_geometry* instance, ColladaAppNode* node)
: instanceGeom(instance), instanceCtrl(0), appNode(node), geomExt(0)
: appNode(node),instanceGeom(instance), instanceCtrl(0), geomExt(0)
{
flags = 0;
numFrames = 0;
@ -325,7 +325,7 @@ ColladaAppMesh::ColladaAppMesh(const domInstance_geometry* instance, ColladaAppN
}
ColladaAppMesh::ColladaAppMesh(const domInstance_controller* instance, ColladaAppNode* node)
: instanceGeom(0), instanceCtrl(instance), appNode(node), geomExt(0)
: appNode(node),instanceGeom(0), instanceCtrl(instance), geomExt(0)
{
flags = 0;
numFrames = 0;

View file

@ -57,9 +57,12 @@ static char* TrimFirstWord(char* str)
}
ColladaAppNode::ColladaAppNode(const domNode* node, ColladaAppNode* parent)
: p_domNode(node), appParent(parent), nodeExt(new ColladaExtension_node(node)),
lastTransformTime(TSShapeLoader::DefaultTime-1), defaultTransformValid(false),
invertMeshes(false)
: p_domNode(node), appParent(parent),
nodeExt(new ColladaExtension_node(node)),
invertMeshes(false),
lastTransformTime(TSShapeLoader::DefaultTime-1),
defaultTransformValid(false)
{
mName = dStrdup(_GetNameOrId(node));
mParentName = dStrdup(parent ? parent->getName() : "ROOT");

View file

@ -26,7 +26,7 @@
Vector<AppMaterial*> AppMesh::appMaterials;
AppMesh::AppMesh()
: flags(0), numFrames(0), numMatFrames(0), vertsPerFrame(0)
: flags(0), vertsPerFrame(0),numFrames(0), numMatFrames(0)
{
}

View file

@ -32,8 +32,8 @@ TSRenderState::TSRenderState()
mNoRenderNonTranslucent( false ),
mMaterialHint( NULL ),
mCuller( NULL ),
mLightQuery( NULL ),
mUseOriginSort( false ),
mLightQuery( NULL ),
mAccuTex( NULL ),
mNodeTransforms( NULL ),
mNodeTransformCount( 0 )

View file

@ -155,17 +155,17 @@ ImposterCaptureMaterialHook* ImposterCaptureMaterialHook::_getOrCreateHook( Base
ImposterCapture::ImposterCapture()
: mShapeInstance( NULL ),
mDl( 0 ),
: mDl( 0 ),
mDim( 0 ),
mRadius( 0.0f ),
mCenter( Point3F( 0, 0, 0 ) ),
mRenderPass( NULL ),
mMeshRenderBin( NULL ),
mBlackBmp( NULL ),
mWhiteBmp( NULL ),
mState( NULL ),
mRenderTarget( NULL )
mShapeInstance( NULL ),
mRenderTarget( NULL ),
mRenderPass( NULL ),
mMeshRenderBin( NULL )
{
}

View file

@ -88,7 +88,7 @@ class ScopeTrackerObject
///
TrackingNode()
: mPosition( 0.0f ), mObject( NULL ), mNext( NULL ), mPrev( NULL ), mOpposite( NULL ) {}
: mOpposite( NULL ), mPosition( 0.0f ), mObject( NULL ), mNext( NULL ), mPrev( NULL ) {}
/// Return the object to which this tracking node belongs.
ScopeTrackerObject* getObject() const { return mObject; }

View file

@ -74,17 +74,17 @@ namespace
}
PlatformWindowSDL::PlatformWindowSDL():
mShouldLockMouse(false),
mMouseLocked(false),
mOwningManager(NULL),
mNextWindow(NULL),
mWindowHandle(NULL),
mOldParent(NULL),
mTarget(NULL),
mDevice(NULL),
mTarget(NULL),
mPosition(0,0),
mMouseLocked(false),
mShouldLockMouse(false),
mSuppressReset(false),
mMenuHandle(NULL),
mPosition(0,0)
mMenuHandle(NULL)
{
mCursorController = new PlatformCursorControllerSDL( this );

View file

@ -32,14 +32,14 @@ extern InputModifiers convertModifierBits(const U32 in);
//-----------------------------------------------------------------------------
// Constructor/Destructor
//-----------------------------------------------------------------------------
WindowInputGenerator::WindowInputGenerator( PlatformWindow *window ) :
WindowInputGenerator::WindowInputGenerator( PlatformWindow *window ) :
mNotifyPosition(true),
mWindow(window),
mInputController(NULL),
mLastCursorPos(0,0),
mClampToWindow(true),
mPixelsPerMickey(1.0f),
mNotifyPosition(true),
mFocused(false)
mFocused(false),
mPixelsPerMickey(1.0f)
{
AssertFatal(mWindow, "NULL PlatformWindow on WindowInputGenerator creation");