From 5ef130d581d32fd82ef5c73e45b17f40deb26ea4 Mon Sep 17 00:00:00 2001 From: Raul Ferriz Date: Fri, 3 Jul 2015 15:52:38 +0200 Subject: [PATCH] Fixed some random Worder warnings --- Engine/source/console/engineTypeInfo.h | 4 ++-- Engine/source/console/simObjectRef.h | 8 ++++---- Engine/source/core/module.h | 11 ++++++----- Engine/source/core/util/rawData.h | 2 +- Engine/source/core/util/tUnmanagedVector.h | 2 +- Engine/source/gfx/gfxVertexBuffer.h | 8 ++++---- Engine/source/platform/async/asyncPacketQueue.h | 7 ++++--- Engine/source/platform/async/asyncPacketStream.h | 4 ++-- Engine/source/platform/threads/threadPoolAsyncIO.h | 10 +++++----- Engine/source/scene/culling/sceneCullingVolume.h | 2 +- Engine/source/sfx/sfxCommon.h | 4 ++-- Engine/source/sfx/sfxDevice.cpp | 4 ++-- 12 files changed, 34 insertions(+), 32 deletions(-) diff --git a/Engine/source/console/engineTypeInfo.h b/Engine/source/console/engineTypeInfo.h index 40f38f51f..01ca40a76 100644 --- a/Engine/source/console/engineTypeInfo.h +++ b/Engine/source/console/engineTypeInfo.h @@ -173,8 +173,8 @@ class EngineFieldTable /// Construct a field table from a NULL-terminated array of Field /// records. EngineFieldTable( const Field* fields ) - : mFields( fields ), - mNumFields( 0 ) + : mNumFields( 0 ), + mFields( fields ) { while( fields[ mNumFields ].getName() ) mNumFields ++; diff --git a/Engine/source/console/simObjectRef.h b/Engine/source/console/simObjectRef.h index d29c0d6e6..d91415e5a 100644 --- a/Engine/source/console/simObjectRef.h +++ b/Engine/source/console/simObjectRef.h @@ -44,9 +44,9 @@ public: static S32 _smTypeId; SimObjectRef() - : mId( 0 ), - mObject( NULL ), - mName( "" ) + : mName( "" ), + mId( 0 ), + mObject( NULL ) { } @@ -178,4 +178,4 @@ public: }; -#endif // _SIMOBJECTREF_H_ \ No newline at end of file +#endif // _SIMOBJECTREF_H_ diff --git a/Engine/source/core/module.h b/Engine/source/core/module.h index 995ab1d13..10f842e6f 100644 --- a/Engine/source/core/module.h +++ b/Engine/source/core/module.h @@ -79,9 +79,9 @@ class Module Dependency( Mode mode, DependencyType type, Module* parentModule, const char* moduleName ) : mType( type ), - mNext( mode == ModeInitialize ? parentModule->mInitDependencies : parentModule->mShutdownDependencies ), mModuleName( moduleName ), - mModule( NULL ) + mModule( NULL ), + mNext( mode == ModeInitialize ? parentModule->mInitDependencies : parentModule->mShutdownDependencies ) { if( mode == ModeInitialize ) parentModule->mInitDependencies = this; @@ -141,11 +141,12 @@ class Module } Module() - : mNext( smFirst ), + : mIsInitialized( false ), + mNext( smFirst ), mInitDependencies( NULL ), mShutdownDependencies( NULL ), - mOverrides( NULL ), - mIsInitialized( false ) + mOverrides( NULL ) + { smFirst = this; } diff --git a/Engine/source/core/util/rawData.h b/Engine/source/core/util/rawData.h index e23d79a57..cce67b73f 100644 --- a/Engine/source/core/util/rawData.h +++ b/Engine/source/core/util/rawData.h @@ -58,7 +58,7 @@ class RawDataT } RawDataT( T* data, U32 size, bool ownMemory = false ) - : data( data ), size( size ), ownMemory( ownMemory ) {} + : ownMemory( ownMemory ), data( data ), size( size ) {} RawDataT(const ThisType& rd) { diff --git a/Engine/source/core/util/tUnmanagedVector.h b/Engine/source/core/util/tUnmanagedVector.h index bc989403f..3e18a441d 100644 --- a/Engine/source/core/util/tUnmanagedVector.h +++ b/Engine/source/core/util/tUnmanagedVector.h @@ -45,7 +45,7 @@ class UnmanagedVector UnmanagedVector() : mCount( 0 ), mArray( NULL ) {} UnmanagedVector( T* array, U32 count ) - : mArray( array ), mCount( count ) {} + : mCount( count ), mArray( array ) {} U32 size() const { return mCount; } bool empty() const { return ( mCount == 0 ); } diff --git a/Engine/source/gfx/gfxVertexBuffer.h b/Engine/source/gfx/gfxVertexBuffer.h index da3aecc82..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/platform/async/asyncPacketQueue.h b/Engine/source/platform/async/asyncPacketQueue.h index 8d30f0c96..513d6ab29 100644 --- a/Engine/source/platform/async/asyncPacketQueue.h +++ b/Engine/source/platform/async/asyncPacketQueue.h @@ -156,12 +156,13 @@ class AsyncPacketQueue Consumer consumer, TickType totalTicks = 0, bool dropPackets = false ) - : mTotalTicks( totalTicks ), + : mDropPackets( dropPackets ), + mTotalTicks( totalTicks ), mTotalQueuedTicks( 0 ), mPacketQueue( maxQueuedPackets ), mTimeSource( timeSource ), - mConsumer( consumer ), - mDropPackets( dropPackets ) + mConsumer( consumer ) + { #ifdef TORQUE_DEBUG mTotalQueuedPackets = 0; diff --git a/Engine/source/platform/async/asyncPacketStream.h b/Engine/source/platform/async/asyncPacketStream.h index 459583e98..a5ed13daf 100644 --- a/Engine/source/platform/async/asyncPacketStream.h +++ b/Engine/source/platform/async/asyncPacketStream.h @@ -56,10 +56,10 @@ class AsyncPacket : public RawDataT< T > typedef RawDataT< T > Parent; AsyncPacket() - : mIndex( 0 ), mIsLast( false ), mSizeActual( 0 ) {} + : mIndex( 0 ), mSizeActual( 0 ), mIsLast( false ) {} AsyncPacket( T* data, U32 size, bool ownMemory = false ) : Parent( data, size, ownMemory ), - mIndex( 0 ), mIsLast( false ), mSizeActual( 0 ) {} + mIndex( 0 ), mSizeActual( 0 ), mIsLast( false ) {} /// Running number in stream. U32 mIndex; diff --git a/Engine/source/platform/threads/threadPoolAsyncIO.h b/Engine/source/platform/threads/threadPoolAsyncIO.h index 0d7c38104..7f37534da 100644 --- a/Engine/source/platform/threads/threadPoolAsyncIO.h +++ b/Engine/source/platform/threads/threadPoolAsyncIO.h @@ -100,8 +100,8 @@ class AsyncIOItem : public ThreadPool::WorkItem : Parent( context ), mStream( stream ), mNumElements( numElements ), - mOffsetInStream( offsetInStream ), - mOffsetInBuffer( 0 ) {} + mOffsetInBuffer( 0 ), + mOffsetInStream( offsetInStream ) {} /// Construct a read item on "stream" that stores data into the given "buffer". /// @@ -109,11 +109,11 @@ class AsyncIOItem : public ThreadPool::WorkItem U32 numElements, OffsetType offsetInStream, bool takeOwnershipOfBuffer = true, ThreadContext* context = 0 ) : Parent( context ), - mStream( stream ), mBuffer( buffer ), + mStream( stream ), mNumElements( numElements ), - mOffsetInStream( offsetInStream ), - mOffsetInBuffer( offsetInBuffer ) + mOffsetInBuffer( offsetInBuffer ), + mOffsetInStream( offsetInStream ) { if( takeOwnershipOfBuffer ) mBuffer.ownMemory = true; diff --git a/Engine/source/scene/culling/sceneCullingVolume.h b/Engine/source/scene/culling/sceneCullingVolume.h index b79e2437b..7cc64d1e8 100644 --- a/Engine/source/scene/culling/sceneCullingVolume.h +++ b/Engine/source/scene/culling/sceneCullingVolume.h @@ -79,7 +79,7 @@ class SceneCullingVolume /// SceneCullingVolume( Type type, const PlaneSetF& planes ) - : mType( type ), mClippingPlanes( planes ), mSortPoint( 1.f ) {} + : mType( type ), mSortPoint( 1.f ), mClippingPlanes( planes ) {} /// Return the type of volume defined by this culling volume, i.e. whether it includes /// or excludes space. diff --git a/Engine/source/sfx/sfxCommon.h b/Engine/source/sfx/sfxCommon.h index 956f24055..7b69b2506 100644 --- a/Engine/source/sfx/sfxCommon.h +++ b/Engine/source/sfx/sfxCommon.h @@ -224,8 +224,8 @@ class SFXFormat U8 bitsPerSample = 0, U32 samplesPerSecond = 0 ) : mChannels( channels ), - mSamplesPerSecond( samplesPerSecond ), - mBitsPerSample( bitsPerSample ) + mBitsPerSample( bitsPerSample ), + mSamplesPerSecond( samplesPerSecond ) {} /// Copy constructor. diff --git a/Engine/source/sfx/sfxDevice.cpp b/Engine/source/sfx/sfxDevice.cpp index 7d0c91b36..3bb37f68f 100644 --- a/Engine/source/sfx/sfxDevice.cpp +++ b/Engine/source/sfx/sfxDevice.cpp @@ -36,10 +36,10 @@ SFXDevice::SFXDevice( const String& name, SFXProvider* provider, bool useHardwar mProvider( provider ), mUseHardware( useHardware ), mMaxBuffers( maxBuffers ), - mStatNumBufferBytes( 0 ), + mCaps( 0 ), mStatNumBuffers( 0 ), mStatNumVoices( 0 ), - mCaps( 0 ) + mStatNumBufferBytes( 0 ) { AssertFatal( provider, "We must have a provider pointer on device creation!" );