Convert dStrcmp to String::compare for more cases

This commit is contained in:
Lukas Aldershaab 2020-10-04 00:00:01 +02:00
parent c999baf7ed
commit 197a62f6ea
22 changed files with 45 additions and 45 deletions

View file

@ -500,7 +500,7 @@ void GuiGameListMenuCtrl::addRow(const char* label, const char* optionsList, boo
const char* option = StringUnit::getUnit(optionsList, i, DELIM);
options.push_back(StringTable->insert(option, true));
if (dStrcmp(option, defaultValue) == 0)
if (String::compare(option, defaultValue) == 0)
defaultOption = options.size() - 1;
}
row->mOptions = options;
@ -1073,7 +1073,7 @@ bool GuiGameListMenuCtrl::selectOption(S32 rowIndex, const char* theOption)
for (Vector<StringTableEntry>::iterator anOption = row->mOptions.begin(); anOption < row->mOptions.end(); ++anOption)
{
if (dStrcmp(*anOption, theOption) == 0)
if (String::compare(*anOption, theOption) == 0)
{
S32 newIndex = anOption - row->mOptions.begin();
row->mSelectedOption = newIndex;

View file

@ -108,7 +108,7 @@ void GuiPopupMenuTextListCtrl::onRenderCell(Point2I offset, Point2I cell, bool s
}
else
{
if (dStrcmp(mList[cell.y].text + 3, "-\t")) // Was: dStrcmp(mList[cell.y].text + 2, "-\t")) but has been changed to take into account the submenu flag
if (String::compare(mList[cell.y].text + 3, "-\t")) // Was: String::compare(mList[cell.y].text + 2, "-\t")) but has been changed to take into account the submenu flag
{
Parent::onRenderCell(offset, cell, selected, mouseOver);
}

View file

@ -1974,11 +1974,11 @@ void GuiConvexEditorCtrl::setSelectedFaceMaterial(const char* materialName)
bool found = false;
U32 oldmatID = mConvexSEL->mSurfaceUVs[mFaceSEL].matID;
if (dStrcmp(materialName, mConvexSEL->getMaterialName().c_str()))
if (String::compare(materialName, mConvexSEL->getMaterialName().c_str()))
{
for (U32 i = 0; i < mConvexSEL->mSurfaceTextures.size(); i++)
{
if (!dStrcmp(mConvexSEL->mSurfaceTextures[i].materialName, materialName))
if (!String::compare(mConvexSEL->mSurfaceTextures[i].materialName, materialName))
{
//found a match
mConvexSEL->mSurfaceUVs[mFaceSEL].matID = i + 1;
@ -2958,7 +2958,7 @@ DefineEngineMethod(GuiConvexEditorCtrl, setSelectedFaceMaterial, void, (const ch
"@return true if successful, false if failed (objB is not valid)")
{
//return Point2F(0, 0);
if (!dStrcmp(materialName, ""))
if (!String::compare(materialName, ""))
return;
object->setSelectedFaceMaterial(materialName);

View file

@ -2415,7 +2415,7 @@ DefineEngineMethod( TerrainEditor, attachTerrain, void, (const char * terrain),
VectorPtr<TerrainBlock*> terrains;
// attach to first found terrainBlock
if (dStrcmp (terrain,"")==0)
if (String::compare (terrain,"")==0)
{
for(SimSetIterator itr(scene); *itr; ++itr)
{