mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-13 11:43:49 +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
|
|
@ -513,7 +513,7 @@ S32 GuiListBoxCtrl::findItemText( StringTableEntry text, bool caseSensitive )
|
|||
for( S32 i = 0; i < mItems.size(); i++ )
|
||||
{
|
||||
// Case Sensitive Compare?
|
||||
if( caseSensitive && ( dStrcmp( mItems[i]->itemText, text ) == 0 ) )
|
||||
if( caseSensitive && ( String::compare( mItems[i]->itemText, text ) == 0 ) )
|
||||
return i;
|
||||
else if (!caseSensitive && ( dStricmp( mItems[i]->itemText, text ) == 0 ))
|
||||
return i;
|
||||
|
|
@ -1584,7 +1584,7 @@ void GuiListBoxCtrl::addFilteredItem( String item )
|
|||
for ( S32 i = 0; i < mSelectedItems.size(); i++ )
|
||||
{
|
||||
String itemText = mSelectedItems[i]->itemText;
|
||||
if ( dStrcmp( itemText.c_str(), item.c_str() ) == 0 )
|
||||
if ( String::compare( itemText.c_str(), item.c_str() ) == 0 )
|
||||
{
|
||||
mSelectedItems.erase_fast( i );
|
||||
break;
|
||||
|
|
@ -1594,7 +1594,7 @@ void GuiListBoxCtrl::addFilteredItem( String item )
|
|||
for ( S32 i = 0; i < mItems.size(); i++ )
|
||||
{
|
||||
String itemText = mItems[i]->itemText;
|
||||
if( dStrcmp( itemText.c_str(), item.c_str() ) == 0 )
|
||||
if( String::compare( itemText.c_str(), item.c_str() ) == 0 )
|
||||
{
|
||||
mItems[i]->isSelected = false;
|
||||
mFilteredItems.push_front( mItems[i] );
|
||||
|
|
@ -1627,7 +1627,7 @@ void GuiListBoxCtrl::removeFilteredItem( String item )
|
|||
for ( S32 i = 0; i < mFilteredItems.size(); i++ )
|
||||
{
|
||||
String itemText = mFilteredItems[i]->itemText;
|
||||
if( dStrcmp( itemText.c_str(), item.c_str() ) == 0 )
|
||||
if( String::compare( itemText.c_str(), item.c_str() ) == 0 )
|
||||
{
|
||||
mItems.push_front( mFilteredItems[i] );
|
||||
mFilteredItems.erase( &mFilteredItems[i] );
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue