mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-15 16:44:36 +00:00
Fix member vars left uninitialized in constructors
This commit is contained in:
parent
3fe0fe1b92
commit
0ffd7f5620
23 changed files with 68 additions and 19 deletions
|
|
@ -87,6 +87,7 @@ ConsoleDocClass( GuiClockHud,
|
||||||
GuiClockHud::GuiClockHud()
|
GuiClockHud::GuiClockHud()
|
||||||
{
|
{
|
||||||
mShowFrame = mShowFill = true;
|
mShowFrame = mShowFill = true;
|
||||||
|
mTimeReversed = false;
|
||||||
mFillColor.set(0, 0, 0, 0.5);
|
mFillColor.set(0, 0, 0, 0.5);
|
||||||
mFrameColor.set(0, 1, 0, 1);
|
mFrameColor.set(0, 1, 0, 1);
|
||||||
mTextColor.set( 0, 1, 0, 1 );
|
mTextColor.set( 0, 1, 0, 1 );
|
||||||
|
|
|
||||||
|
|
@ -117,8 +117,11 @@ GuiShapeNameHud::GuiShapeNameHud()
|
||||||
{
|
{
|
||||||
mFillColor.set( 0.25f, 0.25f, 0.25f, 0.25f );
|
mFillColor.set( 0.25f, 0.25f, 0.25f, 0.25f );
|
||||||
mFrameColor.set( 0, 1, 0, 1 );
|
mFrameColor.set( 0, 1, 0, 1 );
|
||||||
|
mLabelFillColor.set( 0.25f, 0.25f, 0.25f, 0.25f );
|
||||||
|
mLabelFrameColor.set( 0, 1, 0, 1 );
|
||||||
mTextColor.set( 0, 1, 0, 1 );
|
mTextColor.set( 0, 1, 0, 1 );
|
||||||
mShowFrame = mShowFill = true;
|
mShowFrame = mShowFill = true;
|
||||||
|
mShowLabelFrame = mShowLabelFill = false;
|
||||||
mVerticalOffset = 0.5f;
|
mVerticalOffset = 0.5f;
|
||||||
mDistanceFade = 0.1f;
|
mDistanceFade = 0.1f;
|
||||||
mLabelPadding.set(0, 0);
|
mLabelPadding.set(0, 0);
|
||||||
|
|
|
||||||
|
|
@ -148,7 +148,7 @@ protected:
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
GroundCoverCell() {}
|
GroundCoverCell() : mDirty(false) {}
|
||||||
|
|
||||||
~GroundCoverCell()
|
~GroundCoverCell()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -156,6 +156,7 @@ LightningStrikeEvent::LightningStrikeEvent()
|
||||||
{
|
{
|
||||||
mLightning = NULL;
|
mLightning = NULL;
|
||||||
mTarget = NULL;
|
mTarget = NULL;
|
||||||
|
mClientId = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
LightningStrikeEvent::~LightningStrikeEvent()
|
LightningStrikeEvent::~LightningStrikeEvent()
|
||||||
|
|
|
||||||
|
|
@ -240,6 +240,7 @@ struct ServerFilter
|
||||||
|
|
||||||
ServerFilter()
|
ServerFilter()
|
||||||
{
|
{
|
||||||
|
type = Normal;
|
||||||
queryFlags = 0;
|
queryFlags = 0;
|
||||||
gameType = NULL;
|
gameType = NULL;
|
||||||
missionType = NULL;
|
missionType = NULL;
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,7 @@ protected:
|
||||||
const UTF16* mUTF16;
|
const UTF16* mUTF16;
|
||||||
U32 mLength;
|
U32 mLength;
|
||||||
|
|
||||||
StrTest() : mData( 0 ), mUTF16( 0 ) {}
|
StrTest() : mData( 0 ), mUTF16( 0 ), mLength( 0 ) {}
|
||||||
StrTest( const char* str )
|
StrTest( const char* str )
|
||||||
: mData( str ), mLength( str ? dStrlen( str ) : 0 ), mUTF16( NULL )
|
: mData( str ), mLength( str ? dStrlen( str ) : 0 ), mUTF16( NULL )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,12 @@ BasicClouds::BasicClouds()
|
||||||
mTypeMask |= EnvironmentObjectType | StaticObjectType;
|
mTypeMask |= EnvironmentObjectType | StaticObjectType;
|
||||||
mNetFlags.set(Ghostable | ScopeAlways);
|
mNetFlags.set(Ghostable | ScopeAlways);
|
||||||
|
|
||||||
|
mTimeSC =
|
||||||
|
mModelViewProjSC =
|
||||||
|
mTexScaleSC =
|
||||||
|
mTexDirectionSC =
|
||||||
|
mTexOffsetSC = 0;
|
||||||
|
|
||||||
mLayerEnabled[0] = true;
|
mLayerEnabled[0] = true;
|
||||||
mLayerEnabled[1] = true;
|
mLayerEnabled[1] = true;
|
||||||
mLayerEnabled[2] = true;
|
mLayerEnabled[2] = true;
|
||||||
|
|
|
||||||
|
|
@ -73,15 +73,27 @@ U32 CloudLayer::smVertCount = smVertStride * smVertStride;
|
||||||
U32 CloudLayer::smTriangleCount = smStrideMinusOne * smStrideMinusOne * 2;
|
U32 CloudLayer::smTriangleCount = smStrideMinusOne * smStrideMinusOne * 2;
|
||||||
|
|
||||||
CloudLayer::CloudLayer()
|
CloudLayer::CloudLayer()
|
||||||
: mBaseColor( 0.9f, 0.9f, 0.9f, 1.0f ),
|
: mLastTime( 0 ),
|
||||||
mCoverage( 0.5f ),
|
mBaseColor( 0.9f, 0.9f, 0.9f, 1.0f ),
|
||||||
mExposure( 1.0f ),
|
mExposure( 1.0f ),
|
||||||
mWindSpeed( 1.0f ),
|
mCoverage( 0.5f ),
|
||||||
mLastTime( 0 )
|
mWindSpeed( 1.0f )
|
||||||
{
|
{
|
||||||
mTypeMask |= EnvironmentObjectType | StaticObjectType;
|
mTypeMask |= EnvironmentObjectType | StaticObjectType;
|
||||||
mNetFlags.set(Ghostable | ScopeAlways);
|
mNetFlags.set(Ghostable | ScopeAlways);
|
||||||
|
|
||||||
|
mModelViewProjSC =
|
||||||
|
mAmbientColorSC =
|
||||||
|
mSunColorSC =
|
||||||
|
mSunVecSC =
|
||||||
|
mTexScaleSC =
|
||||||
|
mBaseColorSC =
|
||||||
|
mCoverageSC =
|
||||||
|
mExposureSC =
|
||||||
|
mEyePosWorldSC = 0;
|
||||||
|
|
||||||
|
mTexOffsetSC[0] = mTexOffsetSC[1] = mTexOffsetSC[2] = 0;
|
||||||
|
|
||||||
mTexScale[0] = 1.0;
|
mTexScale[0] = 1.0;
|
||||||
mTexScale[1] = 1.0;
|
mTexScale[1] = 1.0;
|
||||||
mTexScale[2] = 1.0;
|
mTexScale[2] = 1.0;
|
||||||
|
|
|
||||||
|
|
@ -64,7 +64,7 @@ public:
|
||||||
};
|
};
|
||||||
|
|
||||||
GFXGLShaderConstHandle::GFXGLShaderConstHandle( GFXGLShader *shader )
|
GFXGLShaderConstHandle::GFXGLShaderConstHandle( GFXGLShader *shader )
|
||||||
: mShader( shader ), mSamplerNum(-1), mInstancingConstant(false)
|
: mShader( shader ), mLocation(0), mOffset(0), mSize(0), mSamplerNum(-1), mInstancingConstant(false)
|
||||||
{
|
{
|
||||||
mValid = false;
|
mValid = false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -103,7 +103,7 @@ class TheoraTextureFrame
|
||||||
F32 mFrameDuration;
|
F32 mFrameDuration;
|
||||||
|
|
||||||
TheoraTextureFrame()
|
TheoraTextureFrame()
|
||||||
: mLockedRect( NULL )
|
: mLockedRect( NULL ), mFrameNumber(0), mFrameTime(0.0f), mFrameDuration(0.0f)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -193,7 +193,7 @@ class VideoEncoderTheora : public VideoEncoder, public Thread
|
||||||
|
|
||||||
public:
|
public:
|
||||||
VideoEncoderTheora() :
|
VideoEncoderTheora() :
|
||||||
mLastFrame(NULL)
|
mCurrentFrame(0), td(NULL), mLastFrame(NULL)
|
||||||
{
|
{
|
||||||
setStatus(false);
|
setStatus(false);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ protected:
|
||||||
S32 mSelectedOption; ///< Index into mOptions pointing at the selected option
|
S32 mSelectedOption; ///< Index into mOptions pointing at the selected option
|
||||||
bool mWrapOptions; ///< Determines if options should "wrap around" at the ends
|
bool mWrapOptions; ///< Determines if options should "wrap around" at the ends
|
||||||
|
|
||||||
Row()
|
Row() : mSelectedOption(0), mWrapOptions(false)
|
||||||
{
|
{
|
||||||
VECTOR_SET_ASSOCIATION( mOptions );
|
VECTOR_SET_ASSOCIATION( mOptions );
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -905,7 +905,7 @@ ConsoleDocClass( DICreateUndoAction,
|
||||||
"@internal");
|
"@internal");
|
||||||
|
|
||||||
DICreateUndoAction::DICreateUndoAction( const UTF8* actionName )
|
DICreateUndoAction::DICreateUndoAction( const UTF8* actionName )
|
||||||
: UndoAction( actionName )
|
: UndoAction( actionName ), mEditor(0), mDatablockId(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -993,7 +993,7 @@ ConsoleDocClass( DIDeleteUndoAction,
|
||||||
"@internal");
|
"@internal");
|
||||||
|
|
||||||
DIDeleteUndoAction::DIDeleteUndoAction( const UTF8 *actionName )
|
DIDeleteUndoAction::DIDeleteUndoAction( const UTF8 *actionName )
|
||||||
: UndoAction( actionName )
|
: UndoAction( actionName ), mEditor(0), mDatablockId(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1081,7 +1081,7 @@ ConsoleDocClass( DBDeleteUndoAction,
|
||||||
"@internal");
|
"@internal");
|
||||||
|
|
||||||
DBDeleteUndoAction::DBDeleteUndoAction( const UTF8 *actionName )
|
DBDeleteUndoAction::DBDeleteUndoAction( const UTF8 *actionName )
|
||||||
: UndoAction( actionName )
|
: UndoAction( actionName ), mEditor(0), mDatablockId(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1190,7 +1190,7 @@ ConsoleDocClass( DBRetargetUndoAction,
|
||||||
"@internal");
|
"@internal");
|
||||||
|
|
||||||
DBRetargetUndoAction::DBRetargetUndoAction( const UTF8 *actionName )
|
DBRetargetUndoAction::DBRetargetUndoAction( const UTF8 *actionName )
|
||||||
: UndoAction( actionName )
|
: UndoAction( actionName ), mEditor(0), mDBFromId(0), mDBToId(0)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,9 @@ blTerrainProxy::blTerrainProxy( SceneObject *obj ) :
|
||||||
Parent( obj ),
|
Parent( obj ),
|
||||||
mLightMapSize( getObject()->getLightMapSize() ),
|
mLightMapSize( getObject()->getLightMapSize() ),
|
||||||
mTerrainBlockSize( getObject()->getBlockSize() ),
|
mTerrainBlockSize( getObject()->getBlockSize() ),
|
||||||
mLightmap( NULL )
|
mShadowVolume( NULL ),
|
||||||
|
mLightmap( NULL ),
|
||||||
|
sgBakedLightmap( NULL )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -38,9 +38,13 @@
|
||||||
|
|
||||||
duDebugDrawTorque::duDebugDrawTorque()
|
duDebugDrawTorque::duDebugDrawTorque()
|
||||||
{
|
{
|
||||||
|
mPrimType = 0;
|
||||||
|
mQuadsMode = false;
|
||||||
|
mVertCount = 0;
|
||||||
|
mGroup = 0;
|
||||||
|
mCurrColor = 0;
|
||||||
mOverrideColor = 0;
|
mOverrideColor = 0;
|
||||||
mOverride = false;
|
mOverride = false;
|
||||||
mGroup = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
duDebugDrawTorque::~duDebugDrawTorque()
|
duDebugDrawTorque::~duDebugDrawTorque()
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,7 @@ RecastPolyList::RecastPolyList()
|
||||||
ntris = 0;
|
ntris = 0;
|
||||||
tris = NULL;
|
tris = NULL;
|
||||||
tricap = 0;
|
tricap = 0;
|
||||||
|
vidx = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
RecastPolyList::~RecastPolyList()
|
RecastPolyList::~RecastPolyList()
|
||||||
|
|
|
||||||
|
|
@ -53,6 +53,7 @@ public:
|
||||||
mRunArg = 0;
|
mRunArg = 0;
|
||||||
mThread = 0;
|
mThread = 0;
|
||||||
mThreadHnd = 0;
|
mThreadHnd = 0;
|
||||||
|
mThreadID = 0;
|
||||||
mDead = false;
|
mDead = false;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -43,13 +43,17 @@ public:
|
||||||
Win32Timer()
|
Win32Timer()
|
||||||
{
|
{
|
||||||
mPerfCountRemainderCurrent = 0.0f;
|
mPerfCountRemainderCurrent = 0.0f;
|
||||||
|
mPerfCountRemainderNext = 0.0f;
|
||||||
|
|
||||||
// Attempt to use QPC for high res timing, otherwise fallback to GTC.
|
// Attempt to use QPC for high res timing, otherwise fallback to GTC.
|
||||||
mUsingPerfCounter = QueryPerformanceFrequency((LARGE_INTEGER *) &mFrequency);
|
mUsingPerfCounter = QueryPerformanceFrequency((LARGE_INTEGER *) &mFrequency);
|
||||||
if(mUsingPerfCounter)
|
if(mUsingPerfCounter)
|
||||||
mUsingPerfCounter = QueryPerformanceCounter((LARGE_INTEGER *) &mPerfCountCurrent);
|
mUsingPerfCounter = QueryPerformanceCounter((LARGE_INTEGER *) &mPerfCountCurrent);
|
||||||
if(!mUsingPerfCounter)
|
if(!mUsingPerfCounter)
|
||||||
|
{
|
||||||
mTickCountCurrent = GetTickCount();
|
mTickCountCurrent = GetTickCount();
|
||||||
|
mTickCountNext = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const S32 getElapsedMs()
|
const S32 getElapsedMs()
|
||||||
|
|
|
||||||
|
|
@ -364,6 +364,9 @@ bool Platform::setClipboard(const char *text)
|
||||||
XClipboard::XClipboard()
|
XClipboard::XClipboard()
|
||||||
{
|
{
|
||||||
mInitialized = false;
|
mInitialized = false;
|
||||||
|
mXData = 0;
|
||||||
|
mTData = 0;
|
||||||
|
mTDataSize = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ class PathManagerEvent : public NetEvent
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef NetEvent Parent;
|
typedef NetEvent Parent;
|
||||||
PathManagerEvent() { }
|
PathManagerEvent() : modifiedPath(0), clearPaths(false) { }
|
||||||
|
|
||||||
void pack(NetConnection*, BitStream*);
|
void pack(NetConnection*, BitStream*);
|
||||||
void write(NetConnection*, BitStream*);
|
void write(NetConnection*, BitStream*);
|
||||||
|
|
|
||||||
|
|
@ -89,19 +89,22 @@ Var::Var()
|
||||||
{
|
{
|
||||||
dStrcpy( (char*)type, "float4" );
|
dStrcpy( (char*)type, "float4" );
|
||||||
structName[0] = '\0';
|
structName[0] = '\0';
|
||||||
|
connectName[0] = '\0';
|
||||||
|
constSortPos = cspUninit;
|
||||||
|
constNum = 0;
|
||||||
|
texCoordNum = 0;
|
||||||
uniform = false;
|
uniform = false;
|
||||||
vertData = false;
|
vertData = false;
|
||||||
connector = false;
|
connector = false;
|
||||||
sampler = false;
|
sampler = false;
|
||||||
mapsToSampler = false;
|
mapsToSampler = false;
|
||||||
texCoordNum = 0;
|
|
||||||
constSortPos = cspUninit;
|
|
||||||
arraySize = 1;
|
arraySize = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Var::Var( const char *inName, const char *inType )
|
Var::Var( const char *inName, const char *inType )
|
||||||
{
|
{
|
||||||
structName[0] = '\0';
|
structName[0] = '\0';
|
||||||
|
connectName[0] = '\0';
|
||||||
uniform = false;
|
uniform = false;
|
||||||
vertData = false;
|
vertData = false;
|
||||||
connector = false;
|
connector = false;
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
ShaderConnector::ShaderConnector()
|
ShaderConnector::ShaderConnector()
|
||||||
{
|
{
|
||||||
mCurTexElem = 0;
|
mCurTexElem = 0;
|
||||||
|
mName[0] = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,13 @@ public:
|
||||||
objectId = obj->getId();
|
objectId = obj->getId();
|
||||||
ghostIndex = index;
|
ghostIndex = index;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
objectId = 0;
|
||||||
|
ghostIndex = 0;
|
||||||
|
}
|
||||||
object = NULL;
|
object = NULL;
|
||||||
|
validObject = false;
|
||||||
}
|
}
|
||||||
~GhostAlwaysObjectEvent()
|
~GhostAlwaysObjectEvent()
|
||||||
{ delete object; }
|
{ delete object; }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue