diff --git a/Engine/source/gui/controls/guiDecoyCtrl.cpp b/Engine/source/gui/controls/guiDecoyCtrl.cpp index 56e2d9467..f7fd881e8 100644 --- a/Engine/source/gui/controls/guiDecoyCtrl.cpp +++ b/Engine/source/gui/controls/guiDecoyCtrl.cpp @@ -142,7 +142,6 @@ void GuiDecoyCtrl::onMouseMove(const GuiEvent &event) if(mIsDecoy == true) { mVisible = false; - GuiControl *parent = getParent(); GuiControl *tempControl = parent->findHitControl(localPoint); //the decoy control has the responsibility of keeping track of the decoyed controls status diff --git a/Engine/source/gui/controls/guiDirectoryFileListCtrl.cpp b/Engine/source/gui/controls/guiDirectoryFileListCtrl.cpp index c244af658..2752bb9dd 100644 --- a/Engine/source/gui/controls/guiDirectoryFileListCtrl.cpp +++ b/Engine/source/gui/controls/guiDirectoryFileListCtrl.cpp @@ -189,7 +189,7 @@ DefineEngineMethod( GuiDirectoryFileListCtrl, getSelectedFiles, const char*, (), // Fetch the remaining entries for( S32 i = 1; i < ItemVector.size(); i++ ) { - StringTableEntry itemText = object->getItemText( ItemVector[i] ); + itemText = object->getItemText( ItemVector[i] ); if( !itemText ) continue; diff --git a/Engine/source/gui/controls/guiTreeViewCtrl.cpp b/Engine/source/gui/controls/guiTreeViewCtrl.cpp index 9d45147e1..266151587 100644 --- a/Engine/source/gui/controls/guiTreeViewCtrl.cpp +++ b/Engine/source/gui/controls/guiTreeViewCtrl.cpp @@ -3004,10 +3004,10 @@ void GuiTreeViewCtrl::onMouseUp(const GuiEvent &event) { if( !mActive || !mAwake || !mVisible ) return; - + + BitSet32 hitFlags = 0; if( isMethod("onMouseUp") ) { - BitSet32 hitFlags = 0; Item* item; S32 hitItemId = -1; @@ -3025,7 +3025,7 @@ void GuiTreeViewCtrl::onMouseUp(const GuiEvent &event) return; } - BitSet32 hitFlags = 0; + hitFlags = 0; Item *item; bool hitCheck = _hitTest( event.mousePoint, item, hitFlags ); mRenamingItem = NULL; @@ -3061,7 +3061,7 @@ void GuiTreeViewCtrl::onMouseUp(const GuiEvent &event) { Parent::onMouseMove( event ); - BitSet32 hitFlags = 0; + hitFlags = 0; if( !_hitTest( event.mousePoint, newItem2, hitFlags ) ) { if( !mShowRoot ) @@ -3794,16 +3794,12 @@ void GuiTreeViewCtrl::onMouseDown(const GuiEvent & event) if (item->isInspectorData()) { Entity* e = dynamic_cast(item->getObject()); - //if (item->mScriptInfo.mText != StringTable->insert("Components")) - { - Entity* e = dynamic_cast(item->getObject()); - if (e) - { - if (item->isExpanded()) - e->onInspect(); - else - e->onEndInspect(); - } + if (e) + { + if (item->isExpanded()) + e->onInspect(); + else + e->onEndInspect(); } } diff --git a/Engine/source/gui/core/guiCanvas.cpp b/Engine/source/gui/core/guiCanvas.cpp index efb0674ea..fd0b65ae0 100644 --- a/Engine/source/gui/core/guiCanvas.cpp +++ b/Engine/source/gui/core/guiCanvas.cpp @@ -1530,9 +1530,9 @@ void GuiCanvas::popDialogControl(GuiControl *gui) if (size() > 0) { - GuiControl *ctrl = static_cast(last()); - if( ctrl->getFirstResponder() ) - ctrl->getFirstResponder()->setFirstResponder(); + GuiControl *lastCtrl = static_cast(last()); + if(lastCtrl->getFirstResponder() ) + lastCtrl->getFirstResponder()->setFirstResponder(); } else { @@ -1547,8 +1547,8 @@ void GuiCanvas::popDialogControl(GuiControl *gui) if (size() > 0) { - GuiControl *ctrl = static_cast(last()); - ctrl->buildAcceleratorMap(); + GuiControl *lastCtrl = static_cast(last()); + lastCtrl->buildAcceleratorMap(); } refreshMouseControl(); } diff --git a/Engine/source/gui/editor/guiEditCtrl.cpp b/Engine/source/gui/editor/guiEditCtrl.cpp index 09644d990..f81619efe 100644 --- a/Engine/source/gui/editor/guiEditCtrl.cpp +++ b/Engine/source/gui/editor/guiEditCtrl.cpp @@ -542,10 +542,10 @@ void GuiEditCtrl::onMouseDragged( const GuiEvent &event ) // Snap the mouse cursor to grid if active. Do this on the mouse cursor so that we handle // incremental drags correctly. - Point2I mousePoint = event.mousePoint; - snapToGrid( mousePoint ); + Point2I dragPoint = event.mousePoint; + snapToGrid(dragPoint); - Point2I delta = mousePoint - mLastDragPos; + Point2I delta = dragPoint - mLastDragPos; // If CTRL is down, apply smart snapping. @@ -584,7 +584,7 @@ void GuiEditCtrl::onMouseDragged( const GuiEvent &event ) // Remember drag point. - mLastDragPos = mousePoint; + mLastDragPos = dragPoint; } else if (mMouseDownMode == MovingSelection && mSelectedControls.size()) { @@ -770,7 +770,7 @@ void GuiEditCtrl::onRender(Point2I offset, const RectI &updateRect) ( mMouseDownMode == MovingSelection || mMouseDownMode == SizingSelection ) && ( mGridSnap.x || mGridSnap.y ) ) { - Point2I cext = getContentControl()->getExtent(); + cext = getContentControl()->getExtent(); Point2I coff = getContentControl()->localToGlobalCoord(Point2I(0,0)); // create point-dots @@ -847,8 +847,8 @@ void GuiEditCtrl::onRender(Point2I offset, const RectI &updateRect) if( mSnapTargets[ axis ] ) { - RectI bounds = mSnapTargets[ axis ]->getGlobalBounds(); - drawer->drawRect( bounds, ColorI( 128, 128, 128, 128 ) ); + RectI snapBounds = mSnapTargets[ axis ]->getGlobalBounds(); + drawer->drawRect(snapBounds, ColorI( 128, 128, 128, 128 ) ); } } } diff --git a/Engine/source/gui/editor/guiFilterCtrl.cpp b/Engine/source/gui/editor/guiFilterCtrl.cpp index a00d4f670..41dfa13a6 100644 --- a/Engine/source/gui/editor/guiFilterCtrl.cpp +++ b/Engine/source/gui/editor/guiFilterCtrl.cpp @@ -177,9 +177,9 @@ void GuiFilterCtrl::onRender(Point2I offset, const RectI &updateRect) Point2I pos = offset; Point2I ext = getExtent(); - RectI r(pos, ext); - GFX->getDrawUtil()->drawRectFill(r, ColorI(255,255,255)); - GFX->getDrawUtil()->drawRect(r, ColorI(0,0,0)); + RectI bgRect(pos, ext); + GFX->getDrawUtil()->drawRectFill(bgRect, ColorI(255,255,255)); + GFX->getDrawUtil()->drawRect(bgRect, ColorI(0,0,0)); // shrink by 2 pixels pos.x += 2; @@ -218,13 +218,13 @@ void GuiFilterCtrl::onRender(Point2I offset, const RectI &updateRect) // draw the knots for (U32 k=0; k < mFilter.size(); k++) { - RectI r; - r.point.x = (S32)(((F32)ext.x/(F32)(mFilter.size()-1)*(F32)k)); - r.point.y = (S32)(ext.y - ((F32)ext.y * mFilter[k])); - r.point += pos + Point2I(-2,-2); - r.extent = Point2I(5,5); + RectI knotRect; + knotRect.point.x = (S32)(((F32)ext.x/(F32)(mFilter.size()-1)*(F32)k)); + knotRect.point.y = (S32)(ext.y - ((F32)ext.y * mFilter[k])); + knotRect.point += pos + Point2I(-2,-2); + knotRect.extent = Point2I(5,5); - GFX->getDrawUtil()->drawRectFill(r, ColorI(255,0,0)); + GFX->getDrawUtil()->drawRectFill(knotRect, ColorI(255,0,0)); } renderChildControls(offset, updateRect); diff --git a/Engine/source/gui/editor/guiInspector.cpp b/Engine/source/gui/editor/guiInspector.cpp index 4551d03e8..de6e43361 100644 --- a/Engine/source/gui/editor/guiInspector.cpp +++ b/Engine/source/gui/editor/guiInspector.cpp @@ -658,18 +658,18 @@ void GuiInspector::refresh() if( !group && !isGroupFiltered( itr->pGroupname ) ) { - GuiInspectorGroup *group = new GuiInspectorGroup( itr->pGroupname, this ); + GuiInspectorGroup *newGroup = new GuiInspectorGroup( itr->pGroupname, this ); - group->registerObject(); - if( !group->getNumFields() ) + newGroup->registerObject(); + if( !newGroup->getNumFields() ) { #ifdef DEBUG_SPEW Platform::outputDebugString( "[GuiInspector] Removing empty group '%s'", - group->getCaption().c_str() ); + newGroup->getCaption().c_str() ); #endif // The group ended up having no fields. Remove it. - group->deleteObject(); + newGroup->deleteObject(); } else { diff --git a/Engine/source/gui/editor/guiInspectorTypes.cpp b/Engine/source/gui/editor/guiInspectorTypes.cpp index f31d4facd..a90da6587 100644 --- a/Engine/source/gui/editor/guiInspectorTypes.cpp +++ b/Engine/source/gui/editor/guiInspectorTypes.cpp @@ -1035,7 +1035,6 @@ GuiControl* GuiInspectorTypeEaseF::constructEditControl() mBrowseButton = new GuiButtonCtrl(); { RectI browseRect( Point2I( ( getLeft() + getWidth()) - 26, getTop() + 2), Point2I(20, getHeight() - 4) ); - char szBuffer[512]; dSprintf( szBuffer, sizeof( szBuffer ), "GetEaseF(%d.getText(), \"%d.apply\", %d.getRoot());", retCtrl->getId(), getId(), getId() ); mBrowseButton->setField( "Command", szBuffer ); mBrowseButton->setField( "text", "E" ); diff --git a/Engine/source/navigation/guiNavEditorCtrl.cpp b/Engine/source/navigation/guiNavEditorCtrl.cpp index bc605c054..64ae03b6c 100644 --- a/Engine/source/navigation/guiNavEditorCtrl.cpp +++ b/Engine/source/navigation/guiNavEditorCtrl.cpp @@ -535,10 +535,10 @@ void GuiNavEditorCtrl::renderScene(const RectI & updateRect) GFXStateBlockDesc desc; desc.setBlend(false); desc.setZReadWrite(true ,true); - MatrixF mat(true); - mat.setPosition(mLinkStart); + MatrixF linkMat(true); + linkMat.setPosition(mLinkStart); Point3F scale(0.8f, 0.8f, 0.8f); - GFX->getDrawUtil()->drawTransform(desc, mat, &scale); + GFX->getDrawUtil()->drawTransform(desc, linkMat, &scale); } }