mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-11 06:34:36 +00:00
Moves from using dStrCmp to the new String::compare static functions. Keeps things cleaner, consistent, and works with intellisense.
This commit is contained in:
parent
76c5e30869
commit
c999baf7ed
68 changed files with 168 additions and 144 deletions
|
|
@ -132,7 +132,7 @@ bool GuiConvexEditorCtrl::onWake()
|
|||
SimGroup::iterator itr = scene->begin();
|
||||
for ( ; itr != scene->end(); itr++ )
|
||||
{
|
||||
if ( dStrcmp( (*itr)->getClassName(), "ConvexShape" ) == 0 )
|
||||
if ( String::compare( (*itr)->getClassName(), "ConvexShape" ) == 0 )
|
||||
{
|
||||
mConvexSEL = static_cast<ConvexShape*>( *itr );
|
||||
mGizmo->set( mConvexSEL->getTransform(), mConvexSEL->getPosition(), mConvexSEL->getScale() );
|
||||
|
|
|
|||
|
|
@ -881,7 +881,7 @@ DefineEngineMethod( GuiDecalEditorCtrl, getSelectionCount, S32, (), , "" )
|
|||
|
||||
DefineEngineMethod( GuiDecalEditorCtrl, retargetDecalDatablock, void, ( const char * dbFrom, const char * dbTo ), , "" )
|
||||
{
|
||||
if( dStrcmp( dbFrom, "" ) != 0 && dStrcmp( dbTo, "" ) != 0 )
|
||||
if( String::compare( dbFrom, "" ) != 0 && String::compare( dbTo, "" ) != 0 )
|
||||
object->retargetDecalDatablock( dbFrom, dbTo );
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ void GuiMissionAreaEditorCtrl::setSelectedMissionArea( MissionArea *missionArea
|
|||
|
||||
DefineEngineMethod( GuiMissionAreaEditorCtrl, setSelectedMissionArea, void, (const char * missionAreaName), (""), "" )
|
||||
{
|
||||
if ( dStrcmp( missionAreaName, "" )==0 )
|
||||
if ( String::compare( missionAreaName, "" )==0 )
|
||||
object->setSelectedMissionArea(NULL);
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -867,7 +867,7 @@ bool TerrainEditor::isMainTile(const GridPoint & gPoint) const
|
|||
const S32 blockSize = (S32)gPoint.terrainBlock->getBlockSize();
|
||||
|
||||
Point2I testPos = gPoint.gridPos;
|
||||
if (!dStrcmp(getCurrentAction(),"paintMaterial"))
|
||||
if (!String::compare(getCurrentAction(),"paintMaterial"))
|
||||
{
|
||||
if (testPos.x == blockSize)
|
||||
testPos.x--;
|
||||
|
|
@ -1181,7 +1181,7 @@ TerrainBlock* TerrainEditor::collide(const Gui3DMouseEvent & evt, Point3F & pos)
|
|||
if (mTerrainBlocks.size() == 0)
|
||||
return NULL;
|
||||
|
||||
if ( mMouseDown && !dStrcmp(getCurrentAction(),"paintMaterial") )
|
||||
if ( mMouseDown && !String::compare(getCurrentAction(),"paintMaterial") )
|
||||
{
|
||||
if ( !mActiveTerrain )
|
||||
return NULL;
|
||||
|
|
@ -1780,7 +1780,7 @@ void TerrainEditor::on3DMouseDown(const Gui3DMouseEvent & event)
|
|||
if(mTerrainBlocks.size() == 0)
|
||||
return;
|
||||
|
||||
if (!dStrcmp(getCurrentAction(),"paintMaterial"))
|
||||
if (!String::compare(getCurrentAction(),"paintMaterial"))
|
||||
{
|
||||
Point3F pos;
|
||||
TerrainBlock* hitTerrain = collide(event, pos);
|
||||
|
|
@ -1805,7 +1805,7 @@ void TerrainEditor::on3DMouseDown(const Gui3DMouseEvent & event)
|
|||
return;
|
||||
}
|
||||
}
|
||||
else if ((event.modifier & SI_ALT) && !dStrcmp(getCurrentAction(),"setHeight"))
|
||||
else if ((event.modifier & SI_ALT) && !String::compare(getCurrentAction(),"setHeight"))
|
||||
{
|
||||
// Set value to terrain height at mouse position
|
||||
GridInfo info;
|
||||
|
|
@ -1847,7 +1847,7 @@ void TerrainEditor::on3DMouseMove(const Gui3DMouseEvent & event)
|
|||
// We do not change the active terrain as the mouse moves when
|
||||
// in painting mode. This is because it causes the material
|
||||
// window to change as you cursor over to it.
|
||||
if ( dStrcmp(getCurrentAction(),"paintMaterial") != 0 )
|
||||
if ( String::compare(getCurrentAction(),"paintMaterial") != 0 )
|
||||
{
|
||||
// Set the active terrain
|
||||
bool changed = mActiveTerrain != hitTerrain;
|
||||
|
|
@ -2028,7 +2028,7 @@ void TerrainEditor::getTerrainBlocksMaterialList(Vector<StringTableEntry>& list)
|
|||
|
||||
void TerrainEditor::setBrushType( const char *type )
|
||||
{
|
||||
if ( mMouseBrush && dStrcmp( mMouseBrush->getType(), type ) == 0 )
|
||||
if ( mMouseBrush && String::compare( mMouseBrush->getType(), type ) == 0 )
|
||||
return;
|
||||
|
||||
if(!dStricmp(type, "box"))
|
||||
|
|
@ -2199,7 +2199,7 @@ void TerrainEditor::processAction(const char* sAction)
|
|||
return;
|
||||
|
||||
TerrainAction * action = mCurrentAction;
|
||||
if (dStrcmp(sAction, "") != 0)
|
||||
if (String::compare(sAction, "") != 0)
|
||||
{
|
||||
action = lookupAction(sAction);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue