From fbfd3ed8ed5d9b8cfdfe03ef36ee9d6fda5c93d8 Mon Sep 17 00:00:00 2001 From: Azaezel Date: Fri, 14 Oct 2016 18:16:55 -0500 Subject: [PATCH] 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., --- Engine/source/T3D/assets/ComponentAsset.cpp | 4 +- Engine/source/T3D/assets/ExampleAsset.cpp | 4 +- Engine/source/T3D/assets/GameObjectAsset.cpp | 4 +- Engine/source/T3D/assets/ShapeAsset.cpp | 4 +- Engine/source/T3D/containerQuery.h | 6 +-- Engine/source/T3D/convexShape.cpp | 8 ++-- Engine/source/T3D/fx/groundCover.cpp | 6 +-- Engine/source/T3D/groundPlane.cpp | 4 +- Engine/source/T3D/guiMaterialPreview.cpp | 14 +++---- Engine/source/T3D/guiObjectView.cpp | 26 ++++++------- Engine/source/T3D/levelInfo.cpp | 8 ++-- Engine/source/T3D/lightFlareData.cpp | 8 ++-- Engine/source/T3D/physics/physicsCommon.h | 4 +- Engine/source/T3D/physics/physicsDebris.cpp | 8 ++-- Engine/source/T3D/physics/physicsForce.cpp | 7 ++-- Engine/source/T3D/physics/physicsShape.cpp | 6 +-- Engine/source/T3D/physics/physicsUserData.h | 11 +++--- Engine/source/T3D/projectile.cpp | 6 +-- Engine/source/T3D/sfx/sfxEmitter.cpp | 4 +- Engine/source/T3D/shapeBase.cpp | 16 ++++---- Engine/source/collision/optimizedPolyList.h | 4 +- Engine/source/console/dynamicTypes.cpp | 4 +- Engine/source/console/engineFunctions.cpp | 8 ++-- Engine/source/console/engineTypeInfo.cpp | 4 +- Engine/source/core/ogg/oggInputStream.cpp | 4 +- Engine/source/core/ogg/oggTheoraDecoder.cpp | 6 +-- Engine/source/core/util/test/strTest.cpp | 2 +- Engine/source/environment/decalRoad.cpp | 4 +- .../editors/guiMeshRoadEditorCtrl.cpp | 39 +++++++++---------- .../editors/guiRiverEditorCtrl.cpp | 6 +-- Engine/source/environment/river.cpp | 10 ++--- Engine/source/environment/waterObject.cpp | 20 +++++----- .../forest/editor/forestBrushElement.cpp | 2 +- .../source/forest/editor/forestBrushTool.cpp | 14 +++---- Engine/source/forest/editor/forestUndo.cpp | 4 +- Engine/source/gfx/gfxOcclusionQuery.h | 2 +- Engine/source/gfx/gfxVertexBuffer.h | 8 ++-- Engine/source/gfx/gl/gfxGLDevice.cpp | 4 +- Engine/source/gfx/gl/gfxGLDeviceProfiler.cpp | 2 +- Engine/source/gfx/gl/gfxGLVertexBuffer.cpp | 7 ++-- Engine/source/gui/controls/guiBitmapCtrl.cpp | 4 +- Engine/source/gui/core/guiControl.cpp | 20 +++++----- .../source/gui/editor/guiInspectorTypes.cpp | 6 +-- Engine/source/gui/worldEditor/creator.cpp | 4 +- .../source/lighting/common/lightMapParams.cpp | 6 +-- Engine/source/math/mSilhouetteExtractor.h | 4 +- Engine/source/scene/sceneManager.cpp | 10 ++--- Engine/source/sfx/openal/sfxALVoice.cpp | 6 +-- Engine/source/sfx/sfxBuffer.cpp | 16 ++++---- Engine/source/sfx/sfxSource.cpp | 32 +++++++-------- Engine/source/sfx/sfxVoice.cpp | 4 +- Engine/source/terrain/terrCell.cpp | 8 ++-- Engine/source/terrain/terrCellMaterial.cpp | 4 +- Engine/source/terrain/terrData.cpp | 24 ++++++------ Engine/source/terrain/terrFile.cpp | 4 +- Engine/source/terrain/terrMaterial.cpp | 4 +- Engine/source/ts/collada/colladaAppMesh.cpp | 4 +- Engine/source/ts/collada/colladaAppNode.cpp | 9 +++-- Engine/source/ts/loader/appMesh.cpp | 2 +- Engine/source/ts/tsRenderState.cpp | 2 +- Engine/source/util/imposterCapture.cpp | 10 ++--- Engine/source/util/scopeTracker.h | 2 +- Engine/source/windowManager/sdl/sdlWindow.cpp | 10 ++--- .../windowManager/windowInputGenerator.cpp | 8 ++-- 64 files changed, 260 insertions(+), 255 deletions(-) diff --git a/Engine/source/T3D/assets/ComponentAsset.cpp b/Engine/source/T3D/assets/ComponentAsset.cpp index 2f4d524ac..b329d391f 100644 --- a/Engine/source/T3D/assets/ComponentAsset.cpp +++ b/Engine/source/T3D/assets/ComponentAsset.cpp @@ -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(); diff --git a/Engine/source/T3D/assets/ExampleAsset.cpp b/Engine/source/T3D/assets/ExampleAsset.cpp index 8a0c09d1e..eed7a4d19 100644 --- a/Engine/source/T3D/assets/ExampleAsset.cpp +++ b/Engine/source/T3D/assets/ExampleAsset.cpp @@ -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(); diff --git a/Engine/source/T3D/assets/GameObjectAsset.cpp b/Engine/source/T3D/assets/GameObjectAsset.cpp index 07cbb2819..6659504bd 100644 --- a/Engine/source/T3D/assets/GameObjectAsset.cpp +++ b/Engine/source/T3D/assets/GameObjectAsset.cpp @@ -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(); diff --git a/Engine/source/T3D/assets/ShapeAsset.cpp b/Engine/source/T3D/assets/ShapeAsset.cpp index ea4882add..9e8bb44a8 100644 --- a/Engine/source/T3D/assets/ShapeAsset.cpp +++ b/Engine/source/T3D/assets/ShapeAsset.cpp @@ -96,9 +96,9 @@ ConsoleSetType(TypeShapeAssetPtr) //----------------------------------------------------------------------------- ShapeAsset::ShapeAsset() : -mAcquireReferenceCount(0), mpOwningAssetManager(NULL), -mAssetInitialized(false) +mAssetInitialized(false), +mAcquireReferenceCount(0) { } diff --git a/Engine/source/T3D/containerQuery.h b/Engine/source/T3D/containerQuery.h index 761c8d898..717d7f85a 100644 --- a/Engine/source/T3D/containerQuery.h +++ b/Engine/source/T3D/containerQuery.h @@ -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) { } diff --git a/Engine/source/T3D/convexShape.cpp b/Engine/source/T3D/convexShape.cpp index aae119d8a..0901c7aa6 100644 --- a/Engine/source/T3D/convexShape.cpp +++ b/Engine/source/T3D/convexShape.cpp @@ -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 ); diff --git a/Engine/source/T3D/fx/groundCover.cpp b/Engine/source/T3D/fx/groundCover.cpp index 9262487dd..483ba75ce 100644 --- a/Engine/source/T3D/fx/groundCover.cpp +++ b/Engine/source/T3D/fx/groundCover.cpp @@ -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 ) { } diff --git a/Engine/source/T3D/groundPlane.cpp b/Engine/source/T3D/groundPlane.cpp index b188a7d39..751967f0f 100644 --- a/Engine/source/T3D/groundPlane.cpp +++ b/Engine/source/T3D/groundPlane.cpp @@ -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 ); diff --git a/Engine/source/T3D/guiMaterialPreview.cpp b/Engine/source/T3D/guiMaterialPreview.cpp index 1229956e6..b97ed959c 100644 --- a/Engine/source/T3D/guiMaterialPreview.cpp +++ b/Engine/source/T3D/guiMaterialPreview.cpp @@ -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(); diff --git a/Engine/source/T3D/guiObjectView.cpp b/Engine/source/T3D/guiObjectView.cpp index 32c1b1565..1cbef0fc3 100644 --- a/Engine/source/T3D/guiObjectView.cpp +++ b/Engine/source/T3D/guiObjectView.cpp @@ -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 ) diff --git a/Engine/source/T3D/levelInfo.cpp b/Engine/source/T3D/levelInfo.cpp index 7d275585a..519b705e3 100644 --- a/Engine/source/T3D/levelInfo.cpp +++ b/Engine/source/T3D/levelInfo.cpp @@ -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; diff --git a/Engine/source/T3D/lightFlareData.cpp b/Engine/source/T3D/lightFlareData.cpp index 84058f6c8..8ea67cb7a 100644 --- a/Engine/source/T3D/lightFlareData.cpp +++ b/Engine/source/T3D/lightFlareData.cpp @@ -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 ); diff --git a/Engine/source/T3D/physics/physicsCommon.h b/Engine/source/T3D/physics/physicsCommon.h index bface037d..ea9817b06 100644 --- a/Engine/source/T3D/physics/physicsCommon.h +++ b/Engine/source/T3D/physics/physicsCommon.h @@ -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 ) { } diff --git a/Engine/source/T3D/physics/physicsDebris.cpp b/Engine/source/T3D/physics/physicsDebris.cpp index 3c4077dc4..a2e2026b3 100644 --- a/Engine/source/T3D/physics/physicsDebris.cpp +++ b/Engine/source/T3D/physics/physicsDebris.cpp @@ -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; diff --git a/Engine/source/T3D/physics/physicsForce.cpp b/Engine/source/T3D/physics/physicsForce.cpp index 720b709bc..a8f16dca5 100644 --- a/Engine/source/T3D/physics/physicsForce.cpp +++ b/Engine/source/T3D/physics/physicsForce.cpp @@ -41,9 +41,10 @@ ConsoleDocClass( PhysicsForce, PhysicsForce::PhysicsForce() - : mWorld( NULL ), - mBody( NULL ), - mPhysicsTick( false ) + : + mWorld( NULL ), + mPhysicsTick( false ), + mBody( NULL ) { } diff --git a/Engine/source/T3D/physics/physicsShape.cpp b/Engine/source/T3D/physics/physicsShape.cpp index 91f59fd70..837de018f 100644 --- a/Engine/source/T3D/physics/physicsShape.cpp +++ b/Engine/source/T3D/physics/physicsShape.cpp @@ -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; diff --git a/Engine/source/T3D/physics/physicsUserData.h b/Engine/source/T3D/physics/physicsUserData.h index 9c6f21e32..9c8b2ddab 100644 --- a/Engine/source/T3D/physics/physicsUserData.h +++ b/Engine/source/T3D/physics/physicsUserData.h @@ -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_ \ No newline at end of file +#endif // _PHYSICS_PHYSICSUSERDATA_H_ diff --git a/Engine/source/T3D/projectile.cpp b/Engine/source/T3D/projectile.cpp index 8bf47de36..61821cbde 100644 --- a/Engine/source/T3D/projectile.cpp +++ b/Engine/source/T3D/projectile.cpp @@ -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 ), diff --git a/Engine/source/T3D/sfx/sfxEmitter.cpp b/Engine/source/T3D/sfx/sfxEmitter.cpp index 064922a14..01fc6ee41 100644 --- a/Engine/source/T3D/sfx/sfxEmitter.cpp +++ b/Engine/source/T3D/sfx/sfxEmitter.cpp @@ -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 ); diff --git a/Engine/source/T3D/shapeBase.cpp b/Engine/source/T3D/shapeBase.cpp index 09fc1ca42..670446ab3 100644 --- a/Engine/source/T3D/shapeBase.cpp +++ b/Engine/source/T3D/shapeBase.cpp @@ -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 ); } diff --git a/Engine/source/collision/optimizedPolyList.h b/Engine/source/collision/optimizedPolyList.h index dc33c6a0e..d8cac8df3 100644 --- a/Engine/source/collision/optimizedPolyList.h +++ b/Engine/source/collision/optimizedPolyList.h @@ -87,9 +87,9 @@ class OptimizedPolyList : public AbstractPolyList Poly() : plane( -1 ), - object( NULL ), - vertexCount( 0 ), material( NULL ), + vertexCount( 0 ), + object( NULL ), type( TriangleFan ) { } diff --git a/Engine/source/console/dynamicTypes.cpp b/Engine/source/console/dynamicTypes.cpp index cdbb23dd5..5abb356ab 100644 --- a/Engine/source/console/dynamicTypes.cpp +++ b/Engine/source/console/dynamicTypes.cpp @@ -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 ); diff --git a/Engine/source/console/engineFunctions.cpp b/Engine/source/console/engineFunctions.cpp index 09b9b4099..175606c5f 100644 --- a/Engine/source/console/engineFunctions.cpp +++ b/Engine/source/console/engineFunctions.cpp @@ -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; diff --git a/Engine/source/console/engineTypeInfo.cpp b/Engine/source/console/engineTypeInfo.cpp index a1cdd9d15..e258696d3 100644 --- a/Engine/source/console/engineTypeInfo.cpp +++ b/Engine/source/console/engineTypeInfo.cpp @@ -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; diff --git a/Engine/source/core/ogg/oggInputStream.cpp b/Engine/source/core/ogg/oggInputStream.cpp index e0777e6ad..43244da26 100644 --- a/Engine/source/core/ogg/oggInputStream.cpp +++ b/Engine/source/core/ogg/oggInputStream.cpp @@ -101,8 +101,8 @@ bool OggDecoder::_nextPacket() //----------------------------------------------------------------------------- OggInputStream::OggInputStream( Stream* stream ) - : mStream( stream ), - mIsAtEnd( false ) + : mIsAtEnd( false ), + mStream( stream ) { ogg_sync_init( &mOggSyncState ); diff --git a/Engine/source/core/ogg/oggTheoraDecoder.cpp b/Engine/source/core/ogg/oggTheoraDecoder.cpp index 1a07c75a2..7fb89229c 100644 --- a/Engine/source/core/ogg/oggTheoraDecoder.cpp +++ b/Engine/source/core/ogg/oggTheoraDecoder.cpp @@ -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. diff --git a/Engine/source/core/util/test/strTest.cpp b/Engine/source/core/util/test/strTest.cpp index 203fc3bb4..d9d06c6a7 100644 --- a/Engine/source/core/util/test/strTest.cpp +++ b/Engine/source/core/util/test/strTest.cpp @@ -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 ); diff --git a/Engine/source/environment/decalRoad.cpp b/Engine/source/environment/decalRoad.cpp index 1cea7ed4a..009215bf8 100644 --- a/Engine/source/environment/decalRoad.cpp +++ b/Engine/source/environment/decalRoad.cpp @@ -272,11 +272,11 @@ SimObjectPtr 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 ), diff --git a/Engine/source/environment/editors/guiMeshRoadEditorCtrl.cpp b/Engine/source/environment/editors/guiMeshRoadEditorCtrl.cpp index 5d0ac3f78..e1a612b00 100644 --- a/Engine/source/environment/editors/guiMeshRoadEditorCtrl.cpp +++ b/Engine/source/environment/editors/guiMeshRoadEditorCtrl.cpp @@ -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"); diff --git a/Engine/source/environment/editors/guiRiverEditorCtrl.cpp b/Engine/source/environment/editors/guiRiverEditorCtrl.cpp index d7f86d10c..01ab745a8 100644 --- a/Engine/source/environment/editors/guiRiverEditorCtrl.cpp +++ b/Engine/source/environment/editors/guiRiverEditorCtrl.cpp @@ -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 diff --git a/Engine/source/environment/river.cpp b/Engine/source/environment/river.cpp index ff11fdbc6..7f8e4e7b4 100644 --- a/Engine/source/environment/river.cpp +++ b/Engine/source/environment/river.cpp @@ -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 ); diff --git a/Engine/source/environment/waterObject.cpp b/Engine/source/environment/waterObject.cpp index 1dab7ca74..20df80258 100644 --- a/Engine/source/environment/waterObject.cpp +++ b/Engine/source/environment/waterObject.cpp @@ -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; diff --git a/Engine/source/forest/editor/forestBrushElement.cpp b/Engine/source/forest/editor/forestBrushElement.cpp index b373b11db..f61834c9e 100644 --- a/Engine/source/forest/editor/forestBrushElement.cpp +++ b/Engine/source/forest/editor/forestBrushElement.cpp @@ -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 ) { diff --git a/Engine/source/forest/editor/forestBrushTool.cpp b/Engine/source/forest/editor/forestBrushTool.cpp index 54a237528..ae71951b5 100644 --- a/Engine/source/forest/editor/forestBrushTool.cpp +++ b/Engine/source/forest/editor/forestBrushTool.cpp @@ -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 ) { } diff --git a/Engine/source/forest/editor/forestUndo.cpp b/Engine/source/forest/editor/forestUndo.cpp index 10d974a61..60be8d2b1 100644 --- a/Engine/source/forest/editor/forestUndo.cpp +++ b/Engine/source/forest/editor/forestUndo.cpp @@ -31,8 +31,8 @@ ForestUndoAction::ForestUndoAction( const Resource &data, ForestEditorCtrl *editor, const char *description ) : UndoAction( description ), - mData( data ), - mEditor( editor ) + mEditor( editor ), + mData( data ) { } diff --git a/Engine/source/gfx/gfxOcclusionQuery.h b/Engine/source/gfx/gfxOcclusionQuery.h index ac6b0bf07..f3537fccc 100644 --- a/Engine/source/gfx/gfxOcclusionQuery.h +++ b/Engine/source/gfx/gfxOcclusionQuery.h @@ -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() diff --git a/Engine/source/gfx/gfxVertexBuffer.h b/Engine/source/gfx/gfxVertexBuffer.h index 51f963852..329d0cf72 100644 --- a/Engine/source/gfx/gfxVertexBuffer.h +++ b/Engine/source/gfx/gfxVertexBuffer.h @@ -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 ) { diff --git a/Engine/source/gfx/gl/gfxGLDevice.cpp b/Engine/source/gfx/gl/gfxGLDevice.cpp index 99167805d..8a069b597 100644 --- a/Engine/source/gfx/gl/gfxGLDevice.cpp +++ b/Engine/source/gfx/gl/gfxGLDevice.cpp @@ -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) { diff --git a/Engine/source/gfx/gl/gfxGLDeviceProfiler.cpp b/Engine/source/gfx/gl/gfxGLDeviceProfiler.cpp index 22d9bb826..254141b71 100644 --- a/Engine/source/gfx/gl/gfxGLDeviceProfiler.cpp +++ b/Engine/source/gfx/gl/gfxGLDeviceProfiler.cpp @@ -58,7 +58,7 @@ public: glGenQueries(1, &mQueryId); } - GLTimer() : mName(NULL), mQueryId(0), mData(NULL) + GLTimer() : mName(NULL), mData(NULL), mQueryId(0) { } diff --git a/Engine/source/gfx/gl/gfxGLVertexBuffer.cpp b/Engine/source/gfx/gl/gfxGLVertexBuffer.cpp index 2cf4cb625..afe86477c 100644 --- a/Engine/source/gfx/gl/gfxGLVertexBuffer.cpp +++ b/Engine/source/gfx/gl/gfxGLVertexBuffer.cpp @@ -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 ) { diff --git a/Engine/source/gui/controls/guiBitmapCtrl.cpp b/Engine/source/gui/controls/guiBitmapCtrl.cpp index 8800fffd0..769445dc3 100644 --- a/Engine/source/gui/controls/guiBitmapCtrl.cpp +++ b/Engine/source/gui/controls/guiBitmapCtrl.cpp @@ -58,8 +58,8 @@ ConsoleDocClass( GuiBitmapCtrl, GuiBitmapCtrl::GuiBitmapCtrl(void) : mBitmapName(), mStartPoint( 0, 0 ), - mWrap( false ), - mColor(ColorI::WHITE) + mColor(ColorI::WHITE), + mWrap( false ) { } diff --git a/Engine/source/gui/core/guiControl.cpp b/Engine/source/gui/core/guiControl.cpp index f3cacc27a..fb833ca7b 100644 --- a/Engine/source/gui/core/guiControl.cpp +++ b/Engine/source/gui/core/guiControl.cpp @@ -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(); diff --git a/Engine/source/gui/editor/guiInspectorTypes.cpp b/Engine/source/gui/editor/guiInspectorTypes.cpp index 7d660d990..1f2bfcdb0 100644 --- a/Engine/source/gui/editor/guiInspectorTypes.cpp +++ b/Engine/source/gui/editor/guiInspectorTypes.cpp @@ -1263,9 +1263,9 @@ void GuiInspectorTypeS32::setValue( StringTableEntry newValue ) //----------------------------------------------------------------------------- GuiInspectorTypeBitMask32::GuiInspectorTypeBitMask32() - : mRollout( NULL ), - mArrayCtrl( NULL ), - mHelper( NULL ) + : mHelper( NULL ), + mRollout( NULL ), + mArrayCtrl( NULL ) { } diff --git a/Engine/source/gui/worldEditor/creator.cpp b/Engine/source/gui/worldEditor/creator.cpp index 31e159f52..9319ea995 100644 --- a/Engine/source/gui/worldEditor/creator.cpp +++ b/Engine/source/gui/worldEditor/creator.cpp @@ -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(); diff --git a/Engine/source/lighting/common/lightMapParams.cpp b/Engine/source/lighting/common/lightMapParams.cpp index e7c2f39de..8eba74308 100644 --- a/Engine/source/lighting/common/lightMapParams.cpp +++ b/Engine/source/lighting/common/lightMapParams.cpp @@ -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) { } diff --git a/Engine/source/math/mSilhouetteExtractor.h b/Engine/source/math/mSilhouetteExtractor.h index e602c0ecc..c1ed8e869 100644 --- a/Engine/source/math/mSilhouetteExtractor.h +++ b/Engine/source/math/mSilhouetteExtractor.h @@ -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. /// diff --git a/Engine/source/scene/sceneManager.cpp b/Engine/source/scene/sceneManager.cpp index 187f32498..3ca9b597b 100644 --- a/Engine/source/scene/sceneManager.cpp +++ b/Engine/source/scene/sceneManager.cpp @@ -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 ); diff --git a/Engine/source/sfx/openal/sfxALVoice.cpp b/Engine/source/sfx/openal/sfxALVoice.cpp index aa90e5c85..21fc51700 100644 --- a/Engine/source/sfx/openal/sfxALVoice.cpp +++ b/Engine/source/sfx/openal/sfxALVoice.cpp @@ -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(); } diff --git a/Engine/source/sfx/sfxBuffer.cpp b/Engine/source/sfx/sfxBuffer.cpp index ebcd09958..f6f9beb1d 100644 --- a/Engine/source/sfx/sfxBuffer.cpp +++ b/Engine/source/sfx/sfxBuffer.cpp @@ -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 ) { } diff --git a/Engine/source/sfx/sfxSource.cpp b/Engine/source/sfx/sfxSource.cpp index d125f55bc..e40dd5073 100644 --- a/Engine/source/sfx/sfxSource.cpp +++ b/Engine/source/sfx/sfxSource.cpp @@ -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 ); diff --git a/Engine/source/sfx/sfxVoice.cpp b/Engine/source/sfx/sfxVoice.cpp index f02244209..b12cfcbcb 100644 --- a/Engine/source/sfx/sfxVoice.cpp +++ b/Engine/source/sfx/sfxVoice.cpp @@ -41,8 +41,8 @@ Signal< void( SFXVoice* voice ) > SFXVoice::smVoiceDestroyedSignal; //----------------------------------------------------------------------------- SFXVoice::SFXVoice( SFXBuffer* buffer ) - : mBuffer( buffer ), - mStatus( SFXStatusNull ), + : mStatus( SFXStatusNull ), + mBuffer( buffer ), mOffset( 0 ) { } diff --git a/Engine/source/terrain/terrCell.cpp b/Engine/source/terrain/terrCell.cpp index a0478ed77..b69cb7fb5 100644 --- a/Engine/source/terrain/terrCell.cpp +++ b/Engine/source/terrain/terrCell.cpp @@ -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 ) ); } diff --git a/Engine/source/terrain/terrCellMaterial.cpp b/Engine/source/terrain/terrCellMaterial.cpp index 5fa4c1e8e..b711dbe8e 100644 --- a/Engine/source/terrain/terrCellMaterial.cpp +++ b/Engine/source/terrain/terrCellMaterial.cpp @@ -69,8 +69,8 @@ Vector _initSamplerNames() const Vector TerrainCellMaterial::mSamplerNames = _initSamplerNames(); TerrainCellMaterial::TerrainCellMaterial() - : mCurrPass( 0 ), - mTerrain( NULL ), + : mTerrain( NULL ), + mCurrPass( 0 ), mPrePassMat( NULL ), mReflectMat( NULL ) { diff --git a/Engine/source/terrain/terrData.cpp b/Engine/source/terrain/terrData.cpp index 5cccbc9c5..ec102ba78 100644 --- a/Engine/source/terrain/terrData.cpp +++ b/Engine/source/terrain/terrData.cpp @@ -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; diff --git a/Engine/source/terrain/terrFile.cpp b/Engine/source/terrain/terrFile.cpp index 85ae8741b..c96ca2021 100644 --- a/Engine/source/terrain/terrFile.cpp +++ b/Engine/source/terrain/terrFile.cpp @@ -45,9 +45,9 @@ template<> ResourceBase::Signature Resource::signature() TerrainFile::TerrainFile() - : mNeedsResaving( false ), + : mSize( 256 ), mFileVersion( FILE_VERSION ), - mSize( 256 ) + mNeedsResaving( false ) { mLayerMap.setSize( mSize * mSize ); dMemset( mLayerMap.address(), 0, mLayerMap.memSize() ); diff --git a/Engine/source/terrain/terrMaterial.cpp b/Engine/source/terrain/terrMaterial.cpp index 9f3a5c76b..edfc826ff 100644 --- a/Engine/source/terrain/terrMaterial.cpp +++ b/Engine/source/terrain/terrMaterial.cpp @@ -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 ), diff --git a/Engine/source/ts/collada/colladaAppMesh.cpp b/Engine/source/ts/collada/colladaAppMesh.cpp index 83c0f207c..d85f7dd66 100644 --- a/Engine/source/ts/collada/colladaAppMesh.cpp +++ b/Engine/source/ts/collada/colladaAppMesh.cpp @@ -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; diff --git a/Engine/source/ts/collada/colladaAppNode.cpp b/Engine/source/ts/collada/colladaAppNode.cpp index fdf56c775..2ffc10fba 100644 --- a/Engine/source/ts/collada/colladaAppNode.cpp +++ b/Engine/source/ts/collada/colladaAppNode.cpp @@ -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"); diff --git a/Engine/source/ts/loader/appMesh.cpp b/Engine/source/ts/loader/appMesh.cpp index 9d44be6cf..c06a5909e 100644 --- a/Engine/source/ts/loader/appMesh.cpp +++ b/Engine/source/ts/loader/appMesh.cpp @@ -26,7 +26,7 @@ Vector AppMesh::appMaterials; AppMesh::AppMesh() - : flags(0), numFrames(0), numMatFrames(0), vertsPerFrame(0) + : flags(0), vertsPerFrame(0),numFrames(0), numMatFrames(0) { } diff --git a/Engine/source/ts/tsRenderState.cpp b/Engine/source/ts/tsRenderState.cpp index f5f63ac73..0c3458af7 100644 --- a/Engine/source/ts/tsRenderState.cpp +++ b/Engine/source/ts/tsRenderState.cpp @@ -32,8 +32,8 @@ TSRenderState::TSRenderState() mNoRenderNonTranslucent( false ), mMaterialHint( NULL ), mCuller( NULL ), - mLightQuery( NULL ), mUseOriginSort( false ), + mLightQuery( NULL ), mAccuTex( NULL ), mNodeTransforms( NULL ), mNodeTransformCount( 0 ) diff --git a/Engine/source/util/imposterCapture.cpp b/Engine/source/util/imposterCapture.cpp index f6bcba23f..7984268e8 100644 --- a/Engine/source/util/imposterCapture.cpp +++ b/Engine/source/util/imposterCapture.cpp @@ -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 ) { } diff --git a/Engine/source/util/scopeTracker.h b/Engine/source/util/scopeTracker.h index c83357753..c58711ca0 100644 --- a/Engine/source/util/scopeTracker.h +++ b/Engine/source/util/scopeTracker.h @@ -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; } diff --git a/Engine/source/windowManager/sdl/sdlWindow.cpp b/Engine/source/windowManager/sdl/sdlWindow.cpp index 0554769c3..d1191e0d4 100644 --- a/Engine/source/windowManager/sdl/sdlWindow.cpp +++ b/Engine/source/windowManager/sdl/sdlWindow.cpp @@ -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 ); diff --git a/Engine/source/windowManager/windowInputGenerator.cpp b/Engine/source/windowManager/windowInputGenerator.cpp index 02d863a6b..2749f0ed8 100644 --- a/Engine/source/windowManager/windowInputGenerator.cpp +++ b/Engine/source/windowManager/windowInputGenerator.cpp @@ -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");