Changed: Minor changes

This commit is contained in:
kervala 2015-11-14 18:33:13 +01:00
parent ddca407f68
commit 2ad5f18f71
10 changed files with 13 additions and 12 deletions

View file

@ -114,7 +114,7 @@ void *CCallbackNetBase::getUserData()
*/
void CCallbackNetBase::addCallbackArray (const TCallbackItem *callbackarray, sint arraysize)
{
if (arraysize == 1 && callbackarray[0].Callback == NULL && string("") == callbackarray[0].Key)
if (arraysize == 1 && callbackarray[0].Callback == NULL && strlen(callbackarray[0].Key) == 0)
{
// it's an empty array, ignore it
return;

View file

@ -752,7 +752,7 @@ sint32 NLPACS::CGlobalRetriever::getIdentifier(const string &id) const
const string &NLPACS::CGlobalRetriever::getIdentifier(const NLPACS::UGlobalPosition &position) const
{
static const string nullString = string("");
static const string nullString;
if (position.InstanceId == -1)
return nullString;

View file

@ -2682,7 +2682,7 @@ class CAHScenarioControl : public IActionHandler
// init current scenario name and parameters
if(!R2::getEditor().isInitialized())
{
ScenarioFileName = string("");
ScenarioFileName.clear();
// empty scenario
CInterfaceElement *result = scenarioWnd->findFromShortId(string("scenario_value_text"));
@ -2950,7 +2950,7 @@ class CAHLoadScenario : public IActionHandler
}
// description
string description = string("");
string description;
result = scenarioWnd->findFromShortId(string("edit_small_description"));
if(result)
{

View file

@ -572,7 +572,7 @@ void checkUnderCursor()
selectedInstance.getMaterial(j).setShininess( 10.0f );
}
selectedInstance = noSelectedInstance;
selectedInstanceURL = string("");
selectedInstanceURL.clear();
}
}
SlotUnderCursor = CLFECOMMON::INVALID_SLOT;

View file

@ -524,7 +524,7 @@ void CEntityManager::reinit()
CShapeInstanceReference CEntityManager::createInstance(const string& shape, const CVector &pos, const string& text, const string& url, bool bbox_active)
{
CShapeInstanceReference nullinstref(UInstance(), string(""), string(""));
CShapeInstanceReference nullinstref(UInstance(), string(), string());
if (!Scene) return nullinstref;
UInstance instance = Scene->createInstance(shape);

View file

@ -2455,7 +2455,7 @@ class CAHCreateAccountRules : public IActionHandler
if(Params==rules[i])
{
if(rulesGr)
rulesGr->setActive(text->getText() != ucstring(""));
rulesGr->setActive(!text->getText().empty());
}
}
}

View file

@ -968,7 +968,7 @@ void CDisplayerVisualEntity::updateName()
ucName = CI18N::get("uiR2EDNoName");
}
std::string actName=std::string("");
std::string actName;
// If entity is in an additionnal act, then postfix its name with the name of the act
if (getDisplayedInstance()->getParentAct() != getEditor().getBaseAct())

View file

@ -65,6 +65,7 @@ void CSessionBrowserImpl::init(CLuaState *ls)
game.setValue("checkRingAccess", luaCheckRingAccess);
game.setValue("getFileHeader", luaGetFileHeader);
}
if (!ClientCfg.Local)
{
CSessionBrowserImpl::getInstance().setAuthInfo(getCookie());
@ -76,8 +77,8 @@ void CSessionBrowserImpl::init(CLuaState *ls)
_LastAuthorRating = 0;
_LastAMRating = 0;
_LastMasterlessRating = 0;
_LastRingPoints = string("");
_LastMaxRingPoints = string("");
_LastRingPoints.clear();
_LastMaxRingPoints.clear();
}

View file

@ -479,7 +479,7 @@ public:
ucstring getLoginName()
{
if (_LoginName == ucstring(""))
if (_LoginName.empty())
_LoginName = getDisplayName();
return _LoginName;

View file

@ -372,7 +372,7 @@ void CScenarioEntryPoints::loadFromXMLFile()
//entry points and package
TShortEntryPoints entryPoints;
std::string package = std::string("");
std::string package;
for(uint e=0; e<_EntryPoints.size(); e++)
{
const CEntryPoint & entryPoint = _EntryPoints[e];