Cleaned up (now unnecessary) .c_str() converstions to CList::SetItemName
parent
bce99308c6
commit
6e89d097e8
|
@ -523,7 +523,7 @@ void PutList(const std::string& baseName, bool bArray, CBot::CBotVar *var, Ui::C
|
||||||
|
|
||||||
if (previous.find(pStatic) != previous.end())
|
if (previous.find(pStatic) != previous.end())
|
||||||
{
|
{
|
||||||
list->SetItemName(rankList++, StrUtils::Format("%s = [circular reference]", varName.c_str()).c_str());
|
list->SetItemName(rankList++, StrUtils::Format("%s = [circular reference]", varName.c_str()));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -531,11 +531,11 @@ void PutList(const std::string& baseName, bool bArray, CBot::CBotVar *var, Ui::C
|
||||||
|
|
||||||
if (type <= CBot::CBotTypBoolean)
|
if (type <= CBot::CBotTypBoolean)
|
||||||
{
|
{
|
||||||
list->SetItemName(rankList++, StrUtils::Format("%s = %s;", varName.c_str(), pStatic->GetValString().c_str()).c_str());
|
list->SetItemName(rankList++, StrUtils::Format("%s = %s;", varName.c_str(), pStatic->GetValString().c_str()));
|
||||||
}
|
}
|
||||||
else if (type == CBot::CBotTypString)
|
else if (type == CBot::CBotTypString)
|
||||||
{
|
{
|
||||||
list->SetItemName(rankList++, StrUtils::Format("%s = \"%s\";", varName.c_str(), pStatic->GetValString().c_str()).c_str());
|
list->SetItemName(rankList++, StrUtils::Format("%s = \"%s\";", varName.c_str(), pStatic->GetValString().c_str()));
|
||||||
}
|
}
|
||||||
else if (type == CBot::CBotTypArrayPointer)
|
else if (type == CBot::CBotTypArrayPointer)
|
||||||
{
|
{
|
||||||
|
@ -552,7 +552,7 @@ void PutList(const std::string& baseName, bool bArray, CBot::CBotVar *var, Ui::C
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//list->SetItemName(rankList++, StrUtils::Format("%s = ?;", varName.c_str()).c_str());
|
//list->SetItemName(rankList++, StrUtils::Format("%s = ?;", varName.c_str()));
|
||||||
assert(false);
|
assert(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,7 +103,7 @@ void CScreenIO::IOReadList(bool isWrite)
|
||||||
m_saveList.clear();
|
m_saveList.clear();
|
||||||
for(const SavedScene& save : m_main->GetPlayerProfile()->GetSavedSceneList())
|
for(const SavedScene& save : m_main->GetPlayerProfile()->GetSavedSceneList())
|
||||||
{
|
{
|
||||||
pl->SetItemName(m_saveList.size(), save.name.c_str());
|
pl->SetItemName(m_saveList.size(), save.name);
|
||||||
m_saveList.push_back(save.path);
|
m_saveList.push_back(save.path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ void CScreenIO::IOReadList(bool isWrite)
|
||||||
{
|
{
|
||||||
std::string nameStr;
|
std::string nameStr;
|
||||||
GetResource(RES_TEXT, RT_IO_NEW, nameStr);
|
GetResource(RES_TEXT, RT_IO_NEW, nameStr);
|
||||||
pl->SetItemName(m_saveList.size(), nameStr.c_str());
|
pl->SetItemName(m_saveList.size(), nameStr);
|
||||||
}
|
}
|
||||||
|
|
||||||
pl->SetSelect(m_saveList.size());
|
pl->SetSelect(m_saveList.size());
|
||||||
|
|
|
@ -370,12 +370,12 @@ void CScreenLevelList::UpdateSceneChap(int &chap)
|
||||||
{
|
{
|
||||||
CLevelParser levelParser("custom", j+1, 0);
|
CLevelParser levelParser("custom", j+1, 0);
|
||||||
levelParser.Load();
|
levelParser.Load();
|
||||||
pl->SetItemName(j, levelParser.Get("Title")->GetParam("text")->AsString().c_str());
|
pl->SetItemName(j, levelParser.Get("Title")->GetParam("text")->AsString());
|
||||||
pl->SetEnable(j, true);
|
pl->SetEnable(j, true);
|
||||||
}
|
}
|
||||||
catch (CLevelParserException& e)
|
catch (CLevelParserException& e)
|
||||||
{
|
{
|
||||||
pl->SetItemName(j, (std::string("[ERROR]: ")+e.what()).c_str());
|
pl->SetItemName(j, std::string("[ERROR]: ")+e.what());
|
||||||
pl->SetEnable(j, false);
|
pl->SetEnable(j, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -221,7 +221,7 @@ void CScreenPlayerSelect::ReadNameList()
|
||||||
auto players = CPlayerProfile::GetPlayerList();
|
auto players = CPlayerProfile::GetPlayerList();
|
||||||
for (int i = 0; i < static_cast<int>(players.size()); ++i)
|
for (int i = 0; i < static_cast<int>(players.size()); ++i)
|
||||||
{
|
{
|
||||||
pl->SetItemName(i, players.at(i).c_str());
|
pl->SetItemName(i, players.at(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -327,7 +327,7 @@ void CScreenSetupControls::UpdateSetupButtons()
|
||||||
auto joysticks = m_app->GetJoystickList();
|
auto joysticks = m_app->GetJoystickList();
|
||||||
for (unsigned int i = 0; i < joysticks.size(); i++)
|
for (unsigned int i = 0; i < joysticks.size(); i++)
|
||||||
{
|
{
|
||||||
pli->SetItemName(1 + i, joysticks[i].name.c_str());
|
pli->SetItemName(1 + i, joysticks[i].name);
|
||||||
}
|
}
|
||||||
pli->SetSelect(m_app->GetJoystickEnabled() ? m_app->GetJoystick().index + 1 : 0);
|
pli->SetSelect(m_app->GetJoystickEnabled() ? m_app->GetJoystick().index + 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,7 +192,7 @@ void CScreenSetupDisplay::UpdateDisplayMode()
|
||||||
mode_text.str("");
|
mode_text.str("");
|
||||||
Math::IntPoint aspect = AspectRatio(mode);
|
Math::IntPoint aspect = AspectRatio(mode);
|
||||||
mode_text << mode.x << "x" << mode.y << " [" << aspect.x << ":" << aspect.y << "]";
|
mode_text << mode.x << "x" << mode.y << " [" << aspect.x << ":" << aspect.y << "]";
|
||||||
pl->SetItemName(i++, mode_text.str().c_str());
|
pl->SetItemName(i++, mode_text.str());
|
||||||
}
|
}
|
||||||
|
|
||||||
pl->SetSelect(m_setupSelMode);
|
pl->SetSelect(m_setupSelMode);
|
||||||
|
|
Loading…
Reference in New Issue