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

@ -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 )
{