uninitialized variables-gui

This commit is contained in:
AzaezelX 2020-05-11 15:03:27 -05:00
parent b9c207765e
commit 9fef1b3cd1
43 changed files with 119 additions and 33 deletions

View file

@ -164,6 +164,8 @@ GuiTSCtrl::GuiTSCtrl()
mLastCameraQuery.hasStereoTargets = false;
mLastCameraQuery.ortho = false;
mOrthoWidth = 0.1f;
mOrthoHeight = 0.1f;
}
//-----------------------------------------------------------------------------

View file

@ -58,6 +58,7 @@ GuiButtonCtrl::GuiButtonCtrl()
{
setExtent(140, 30);
mButtonText = StringTable->EmptyString();
mHasTheme = false;
}
//-----------------------------------------------------------------------------
@ -121,4 +122,4 @@ void GuiButtonCtrl::onRender(Point2I offset,
//render the children
renderChildControls( offset, updateRect);
}
}

View file

@ -90,8 +90,10 @@ EndImplementEnumType;
GuiAutoScrollCtrl::GuiAutoScrollCtrl()
: mDirection( Up ),
mIsLooping( true ),
mCurrentPhase( PhaseComplete ),
mCurrentPhase( GuiAutoScrollCtrl::PhaseComplete ),
mCurrentTime( 0.f ),
mCompleteTime(FLT_MAX),
mCurrentPosition(0.0f),
mStartDelay( 3.f ),
mResetDelay( 5.f ),
mChildBorder( 10 ),

View file

@ -59,6 +59,7 @@ GuiFormCtrl::GuiFormCtrl()
// The attached menu bar
mHasMenu = false;
mMenuBar = NULL;
mMouseMovingWin = false;
}
GuiFormCtrl::~GuiFormCtrl()

View file

@ -114,10 +114,6 @@ protected:
/* member variables */
Vector<S32> mColumnOffsets;
Vector<S32> mRowOffsets;
GuiCursor *mMoveCursor;
GuiCursor *mUpDownCursor;
GuiCursor *mLeftRightCursor;
GuiCursor *mDefaultCursor;
FrameDetail mFramesetDetails;
VectorPtr<FrameDetail *> mFrameDetails;
bool mAutoBalance;

View file

@ -74,7 +74,10 @@ GuiRolloutCtrl::GuiRolloutCtrl()
mIsContainer = true;
mCanCollapse = true;
mAutoCollapseSiblings = false;
mDefaultCursor = NULL;
mVertSizingCursor = NULL;
mHasTexture = false;
mBitmapBounds = NULL;
// Make sure we receive our ticks.
setProcessTicks();
}

View file

@ -74,10 +74,22 @@ GuiScrollCtrl::GuiScrollCtrl()
mChildPos(0, 0),
mChildExt(0, 0),
mScrollTargetPos( -1, -1 ),
mBaseThumbSize(0)
mBaseThumbSize(0),
mHBarEnabled(false),
mVBarEnabled(false),
mHasHScrollBar(false),
mHasVScrollBar(false),
mHThumbSize(1),
mHThumbPos(0),
mVThumbSize(1),
mVThumbPos(0),
mThumbMouseDelta(0)
{
mBitmapBounds = NULL;
mIsContainer = true;
setExtent(200,200);
mLastPreRender = Platform::getVirtualMilliseconds();
mLastUpdated = Platform::getVirtualMilliseconds();
}
//-----------------------------------------------------------------------------

View file

@ -116,6 +116,11 @@ GuiWindowCtrl::GuiWindowCtrl()
mMaximizeButtonPressed = false;
mMinimizeButtonPressed = false;
mRepositionWindow = false;
mResizeWindow = false;
mSnapSignal = false;
mPreCollapsedYExtent = 200;
mPreCollapsedYMinExtent = 176;
mText = "New Window";
}

View file

@ -54,7 +54,8 @@ ConsoleDocClass( GuiDecoyCtrl,
GuiDecoyCtrl::GuiDecoyCtrl() : mMouseOver(false),
mIsDecoy(true),
mDecoyReference(NULL)
mDecoyReference(NULL),
mMouseOverDecoy(false)
{
}
@ -235,4 +236,4 @@ void GuiDecoyCtrl::onMiddleMouseUp(const GuiEvent &)
void GuiDecoyCtrl::onMiddleMouseDragged(const GuiEvent &)
{
}
}

View file

@ -280,6 +280,10 @@ GuiPopUpMenuCtrl::GuiPopUpMenuCtrl(void)
mBitmapName = StringTable->EmptyString(); // Added
mBitmapBounds.set(16, 16); // Added
mIdMax = -1;
mBackground = NULL;
mTl = NULL;
mSc = NULL;
mReplaceText = false;
}
//------------------------------------------------------------------------------

View file

@ -332,6 +332,10 @@ GuiPopUpMenuCtrlEx::GuiPopUpMenuCtrlEx(void)
mBitmapBounds.set(16, 16); // Added
mHotTrackItems = false;
mIdMax = -1;
mBackground = NULL;
mTl = NULL;
mSc = NULL;
mReplaceText = false;
}
//------------------------------------------------------------------------------

View file

@ -100,8 +100,10 @@ GuiSliderCtrl::GuiSliderCtrl()
mMouseOver( false ),
mDepressed( false ),
mMouseDragged( false ),
mHasTexture(false),
mUseFillBar(false),
mFillBarColor(ColorI(255,255,255))
mFillBarColor(ColorI(255,255,255)),
mBitmapBounds(NULL)
{
}

View file

@ -53,6 +53,7 @@ GuiTabPageCtrl::GuiTabPageCtrl(void)
dStrcpy(mText,(UTF8*)"TabPage", MAX_STRING_LENGTH);
mActive = true;
mIsContainer = true;
mTabIndex = -1;
}
void GuiTabPageCtrl::initPersistFields()

View file

@ -95,6 +95,8 @@ GuiTextEditSliderBitmapCtrl::GuiTextEditSliderBitmapCtrl()
mTextAreaHit = None;
mFocusOnMouseWheel = false;
mBitmapName = StringTable->insert( "" );
mMouseDownTime = 0;
mNumberOfBitmaps = 0;
}
GuiTextEditSliderBitmapCtrl::~GuiTextEditSliderBitmapCtrl()
@ -444,4 +446,4 @@ void GuiTextEditSliderBitmapCtrl::setBitmap(const char *name)
if(awake)
onWake();
setUpdate();
}
}

View file

@ -62,6 +62,7 @@ GuiTextEditSliderCtrl::GuiTextEditSliderCtrl()
mFormat = StringTable->insert("%3.2f");
mTextAreaHit = None;
mFocusOnMouseWheel = false;
mMouseDownTime = 0.0f;
}
GuiTextEditSliderCtrl::~GuiTextEditSliderCtrl()

View file

@ -150,6 +150,7 @@ GuiCanvas::GuiCanvas(): GuiControl(),
#else
mNumFences = 0;
#endif
mConsumeLastInputEvent = false;
}
GuiCanvas::~GuiCanvas()

View file

@ -57,6 +57,8 @@ GuiScriptNotifyCtrl::GuiScriptNotifyCtrl()
mOnResize = false;
mOnChildResized = false;
mOnParentResized = false;
mOnLoseFirstResponder = true;
mOnGainFirstResponder = true;
}
GuiScriptNotifyCtrl::~GuiScriptNotifyCtrl()

View file

@ -79,6 +79,7 @@ GuiCursor::GuiCursor()
mRenderOffset.set(0.0f,0.0f);
mExtent.set(1,1);
mTextureObject = NULL;
mBitmapName = StringTable->EmptyString();
}
GuiCursor::~GuiCursor()

View file

@ -64,6 +64,12 @@ DbgFileView::DbgFileView()
mFindLineNumber = -1;
mSize.set(1, 0);
mbMouseDragging = false;
mMouseDownChar = -1;
mMouseOverVariable[0] = '\0';
mMouseOverValue[0] = '\0';
mMouseVarStart = -1;
mMouseVarEnd = -1;
}
DefineEngineMethod(DbgFileView, setCurrentLine, void, (S32 line, bool selected), , "(int line, bool selected)"

View file

@ -101,7 +101,9 @@ GuiEditCtrl::GuiEditCtrl()
mDrawBorderLines( true ),
mFullBoxSelection( false ),
mSnapSensitivity( 2 ),
mDrawGuides( true )
mDrawGuides( true ),
mDragAddSelection(false),
mDragMoveUndo(false)
{
VECTOR_SET_ASSOCIATION( mSelectedControls );
VECTOR_SET_ASSOCIATION( mDragBeginPoints );
@ -116,11 +118,21 @@ GuiEditCtrl::GuiEditCtrl()
mDragGuide[ GuideVertical ] = false;
mDragGuide[ GuideHorizontal ] = false;
mDragGuideIndex[0] = 0;
mDragGuideIndex[1] = 1;
std::fill_n(mSnapOffset, 2, 0);
std::fill_n(mSnapEdge, 2, SnapEdgeMin);
if( !smGuidesPropertyName[ GuideVertical ] )
smGuidesPropertyName[ GuideVertical ] = StringTable->insert( "guidesVertical" );
if( !smGuidesPropertyName[ GuideHorizontal ] )
smGuidesPropertyName[ GuideHorizontal ] = StringTable->insert( "guidesHorizontal" );
mTrash = NULL;
mSelectedSet = NULL;
mMouseDownMode = GuiEditCtrl::Selecting;
mSizingMode = GuiEditCtrl::sizingNone;
}
//-----------------------------------------------------------------------------

View file

@ -1087,7 +1087,7 @@ bool GuiInspectorTypeEaseF::updateRects()
// GuiInspectorTypeColor (Base for ColorI/LinearColorF)
//-----------------------------------------------------------------------------
GuiInspectorTypeColor::GuiInspectorTypeColor()
: mBrowseButton( NULL )
: mColorFunction(NULL), mBrowseButton( NULL )
{
}

View file

@ -102,6 +102,8 @@ GuiParticleGraphCtrl::GuiParticleGraphCtrl()
mPointXMovementClamped = false;
mOutlineColor = ColorI(1, 1, 1);
mCursorPos = Point2I(0, 0);
mTooltipSelectedPlot = 0;
mRenderNextGraphTooltip = false;
}
ImplementEnumType( GuiParticleGraphType,

View file

@ -95,6 +95,7 @@ GuiPopupMenuTextListCtrl::GuiPopupMenuTextListCtrl()
mPopup = nullptr;
mLastHighlightedMenuIdx = -1;
mBackground = NULL;
}
void GuiPopupMenuTextListCtrl::onRenderCell(Point2I offset, Point2I cell, bool selected, bool mouseOver)
@ -258,4 +259,4 @@ void GuiPopupMenuTextListCtrl::onCellHighlighted(Point2I cell)
list->mSubMenu->showPopup(getRoot(), getPosition().x + mCellSize.x, getPosition().y + (selectionIndex * mCellSize.y));
}
}
}
}

View file

@ -69,6 +69,7 @@ GuiShapeEdPreview::GuiShapeEdPreview()
mRenderNodes( false ),
mRenderBounds( false ),
mRenderObjBox( false ),
mRenderColMeshes( false ),
mRenderMounts( true ),
mSunDiffuseColor( 255, 255, 255, 255 ),
mSelectedNode( -1 ),

View file

@ -42,13 +42,15 @@ GuiInspectorCustomField::GuiInspectorCustomField( GuiInspector *inspector,
{
mInspector = inspector;
mParent = parent;
setBounds(0,0,100,20);
setBounds(0,0,100,20);
mDoc = StringTable->insert("no Docs Found!");
}
GuiInspectorCustomField::GuiInspectorCustomField()
{
mInspector = NULL;
mParent = NULL;
mDoc = StringTable->insert("no Docs Found!");
}
void GuiInspectorCustomField::setData( const char* data, bool callbacks )

View file

@ -34,7 +34,7 @@ class GuiInspectorDynamicField : public GuiInspectorField
public:
GuiInspectorDynamicField( GuiInspector *inspector, GuiInspectorGroup* parent, SimFieldDictionary::Entry* field );
GuiInspectorDynamicField() {};
GuiInspectorDynamicField() :mDynField(NULL), mDeleteButton(NULL) {};
~GuiInspectorDynamicField() {};
DECLARE_CONOBJECT( GuiInspectorDynamicField );

View file

@ -37,9 +37,9 @@ private:
public:
DECLARE_CONOBJECT(GuiInspectorDynamicGroup);
GuiInspectorDynamicGroup() { /*mNeedScroll=false;*/ };
GuiInspectorDynamicGroup() { mAddCtrl = NULL;/*mNeedScroll=false;*/ };
GuiInspectorDynamicGroup( StringTableEntry groupName, SimObjectPtr<GuiInspector> parent )
: GuiInspectorGroup( groupName, parent) { /*mNeedScroll=false;*/};
: GuiInspectorGroup( groupName, parent) { mAddCtrl = NULL;/*mNeedScroll=false;*/};
//-----------------------------------------------------------------------------
// inspectGroup is overridden in GuiInspectorDynamicGroup to inspect an

View file

@ -52,7 +52,11 @@ GuiInspectorField::GuiInspectorField( GuiInspector* inspector,
mEdit( NULL ),
mTargetObject(NULL),
mUseHeightOverride(false),
mHeightOverride(18)
mHighlighted(false),
mHeightOverride(18),
mSpecialEditField(false),
mVariableName(StringTable->EmptyString()),
mCallbackName(StringTable->EmptyString())
{
if( field != NULL )
mCaption = field->pFieldname;

View file

@ -41,7 +41,10 @@ ConsoleDocClass( GuiInspectorVariableField,
"@internal"
);
GuiInspectorVariableField::GuiInspectorVariableField()
GuiInspectorVariableField::GuiInspectorVariableField()
: mVariableName(StringTable->EmptyString()),
mSetCallbackName(StringTable->EmptyString()),
mOwnerObject(NULL)
{
}

View file

@ -164,6 +164,7 @@ GuiMessageVectorCtrl::GuiMessageVectorCtrl()
VECTOR_SET_ASSOCIATION(mLineElements);
mMessageVector = NULL;
mMinSensibleWidth = 1;
mLineSpacingPixels = 0;
mLineContinuationIndent = 10;

View file

@ -121,7 +121,9 @@ GuiProgressBitmapCtrl::GuiProgressBitmapCtrl()
: mProgress( 0.f ),
mBitmapName( StringTable->EmptyString() ),
mUseVariable( false ),
mTile( false )
mTile( false ),
mNumberOfBitmaps(0),
mDim(0)
{
}

View file

@ -52,7 +52,7 @@ class GuiBubbleTextCtrl : public GuiTextCtrl
DECLARE_DESCRIPTION( "A single-line text control that displays its text in a multi-line\n"
"popup when clicked." );
GuiBubbleTextCtrl() { mInAction = false; }
GuiBubbleTextCtrl() :mInAction(false), mDlg(NULL), mPopup(NULL), mMLText(NULL) {}
virtual void onMouseDown(const GuiEvent &event);
};

View file

@ -146,7 +146,9 @@ S32 CreatorTree::Node::getSelected()
CreatorTree::CreatorTree() :
mCurId(0),
mRoot(0),
mTxtOffset(5)
mTxtOffset(5),
mTabSize(11),
mMaxWidth(0)
{
VECTOR_SET_ASSOCIATION(mNodeList);
clear();

View file

@ -106,7 +106,7 @@ EditTSCtrl::EditTSCtrl()
mMiddleMouseDown = false;
mMiddleMouseTriggered = false;
mMouseLeft = false;
mLastMouseClamping = false;
mBlendSB = NULL;
}

View file

@ -202,6 +202,7 @@ GizmoProfile::GizmoProfile()
centroidColor.set( 255, 255, 255 );
centroidHighlightColor.set( 255, 0, 255 );
hideDisabledAxes = true;
restoreDefaultState();
}
@ -297,6 +298,7 @@ Gizmo::Gizmo()
mObjectMat( true ),
mTransform( true ),
mCameraMat( true ),
mProjLen(1000.0f),
mSelectionIdx( -1 ),
mObjectMatInv( true ),
mCurrentTransform( true ),
@ -308,10 +310,13 @@ Gizmo::Gizmo()
mCurrentAlignment( World ),
mDeltaTotalScale( 0,0,0 ),
mDeltaTotalRot( 0,0,0 ),
mDeltaAngle(0.0f),
mLastAngle(0.0f),
mDeltaTotalPos( 0,0,0 ),
mCurrentMode( MoveMode ),
mMouseDownPos( -1,-1 ),
mDirty( false ),
mSign(0.0f),
mMouseDown( false ),
mLastWorldMat( true ),
mLastProjMat( true ),
@ -324,9 +329,10 @@ Gizmo::Gizmo()
mHighlightAll( false ),
mMoveGridEnabled( true ),
mMoveGridSize( 20.f ),
mMoveGridSpacing( 1.f )
{
mUniformHandleEnabled = true;
mMoveGridSpacing( 1.f ),
mUniformHandleEnabled(true),
mScreenRotateHandleEnabled(false)
{
mAxisEnabled[0] = mAxisEnabled[1] = mAxisEnabled[2] = true;
}

View file

@ -391,9 +391,9 @@ protected:
/// Spacing between grid lines on the move grid.
U32 mMoveGridSpacing;
bool mAxisEnabled[3];
bool mUniformHandleEnabled;
bool mScreenRotateHandleEnabled;
bool mAxisEnabled[3];
// Used to override rendering of handles.
bool mHighlightCentroidHandle;

View file

@ -68,6 +68,7 @@ GuiConvexEditorCtrl::GuiConvexEditorCtrl()
mFaceHL( -1 ),
mFaceSavedXfm( true ),
mSavedUndo( false ),
mHasGeometry(false),
mDragging( false ),
mGizmoMatOffset( Point3F::Zero ),
mPivotPos( Point3F::Zero ),

View file

@ -248,7 +248,7 @@ class GuiConvexEditorUndoAction : public UndoAction
friend class GuiConvexEditorCtrl;
public:
GuiConvexEditorUndoAction( const UTF8* actionName ) : UndoAction( actionName )
GuiConvexEditorUndoAction( const UTF8* actionName ) : UndoAction( actionName ), mEditor(NULL), mObjId(NULL)
{
}

View file

@ -142,7 +142,7 @@ class GuiMissionAreaUndoAction : public UndoAction
{
public:
GuiMissionAreaUndoAction( const UTF8* actionName ) : UndoAction( actionName )
GuiMissionAreaUndoAction( const UTF8* actionName ) : UndoAction( actionName ), mMissionAreaEditor(NULL), mObjId(NULL)
{
}

View file

@ -773,7 +773,7 @@ ConsoleDocClass( TerrainSmoothAction,
);
TerrainSmoothAction::TerrainSmoothAction()
: UndoAction( "Terrain Smoothing" )
: UndoAction("Terrain Smoothing"), mFactor(1.0), mSteps(1), mTerrainId(NULL)
{
}
@ -836,4 +836,4 @@ void TerrainSmoothAction::redo()
// Tell the terrain to update itself.
terrain->updateGrid( Point2I::Zero, Point2I::Max, true );
}
}

View file

@ -211,7 +211,7 @@ class ScaleHeightAction : public TerrainAction
class BrushAdjustHeightAction : public TerrainAction
{
public:
BrushAdjustHeightAction(TerrainEditor * editor) : TerrainAction(editor){}
BrushAdjustHeightAction(TerrainEditor* editor) : TerrainAction(editor) { mPreviousZ = 0.0f; }
StringTableEntry getName(){return("brushAdjustHeight");}
void process(Selection * sel, const Gui3DMouseEvent & event, bool selChanged, Type type);

View file

@ -219,6 +219,7 @@ ConsoleDocClass( InspectorFieldUndoAction,
InspectorFieldUndoAction::InspectorFieldUndoAction()
{
mInspector = NULL;
mObjId = 0;
mField = NULL;
mSlotName = StringTable->EmptyString();

View file

@ -133,6 +133,7 @@ class WorldEditor : public EditTSCtrl
WorldEditorUndoAction( const UTF8* actionName ) : UndoAction( actionName )
{
mWorldEditor = NULL;
}
WorldEditor *mWorldEditor;