From 2ad5f18f71f3d4852ff646204410712df0d7b0bd Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 14 Nov 2015 18:33:13 +0100 Subject: [PATCH] Changed: Minor changes --- code/nel/src/net/callback_net_base.cpp | 2 +- code/nel/src/pacs/global_retriever.cpp | 2 +- code/ryzom/client/src/connection.cpp | 4 ++-- code/ryzom/client/src/cursor_functions.cpp | 2 +- code/ryzom/client/src/entities.cpp | 2 +- code/ryzom/client/src/login.cpp | 2 +- code/ryzom/client/src/r2/displayer_visual_entity.cpp | 2 +- code/ryzom/client/src/session_browser_impl.cpp | 5 +++-- code/ryzom/client/src/user_entity.h | 2 +- code/ryzom/common/src/game_share/scenario_entry_points.cpp | 2 +- 10 files changed, 13 insertions(+), 12 deletions(-) diff --git a/code/nel/src/net/callback_net_base.cpp b/code/nel/src/net/callback_net_base.cpp index 661e47336..7a117f640 100644 --- a/code/nel/src/net/callback_net_base.cpp +++ b/code/nel/src/net/callback_net_base.cpp @@ -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; diff --git a/code/nel/src/pacs/global_retriever.cpp b/code/nel/src/pacs/global_retriever.cpp index 0b8d355df..27b32fbf1 100644 --- a/code/nel/src/pacs/global_retriever.cpp +++ b/code/nel/src/pacs/global_retriever.cpp @@ -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; diff --git a/code/ryzom/client/src/connection.cpp b/code/ryzom/client/src/connection.cpp index 285bbfab8..a2d139294 100644 --- a/code/ryzom/client/src/connection.cpp +++ b/code/ryzom/client/src/connection.cpp @@ -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) { diff --git a/code/ryzom/client/src/cursor_functions.cpp b/code/ryzom/client/src/cursor_functions.cpp index 8c3bc3a32..f318784a6 100644 --- a/code/ryzom/client/src/cursor_functions.cpp +++ b/code/ryzom/client/src/cursor_functions.cpp @@ -572,7 +572,7 @@ void checkUnderCursor() selectedInstance.getMaterial(j).setShininess( 10.0f ); } selectedInstance = noSelectedInstance; - selectedInstanceURL = string(""); + selectedInstanceURL.clear(); } } SlotUnderCursor = CLFECOMMON::INVALID_SLOT; diff --git a/code/ryzom/client/src/entities.cpp b/code/ryzom/client/src/entities.cpp index 516232108..4283e6e4b 100644 --- a/code/ryzom/client/src/entities.cpp +++ b/code/ryzom/client/src/entities.cpp @@ -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); diff --git a/code/ryzom/client/src/login.cpp b/code/ryzom/client/src/login.cpp index 2dda3bf6a..aacc37053 100644 --- a/code/ryzom/client/src/login.cpp +++ b/code/ryzom/client/src/login.cpp @@ -2455,7 +2455,7 @@ class CAHCreateAccountRules : public IActionHandler if(Params==rules[i]) { if(rulesGr) - rulesGr->setActive(text->getText() != ucstring("")); + rulesGr->setActive(!text->getText().empty()); } } } diff --git a/code/ryzom/client/src/r2/displayer_visual_entity.cpp b/code/ryzom/client/src/r2/displayer_visual_entity.cpp index 5bc8638f0..2e9eeef7a 100644 --- a/code/ryzom/client/src/r2/displayer_visual_entity.cpp +++ b/code/ryzom/client/src/r2/displayer_visual_entity.cpp @@ -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()) diff --git a/code/ryzom/client/src/session_browser_impl.cpp b/code/ryzom/client/src/session_browser_impl.cpp index 52063e132..9e82a6d15 100644 --- a/code/ryzom/client/src/session_browser_impl.cpp +++ b/code/ryzom/client/src/session_browser_impl.cpp @@ -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(); } diff --git a/code/ryzom/client/src/user_entity.h b/code/ryzom/client/src/user_entity.h index ffcdc42e5..21b967e8a 100644 --- a/code/ryzom/client/src/user_entity.h +++ b/code/ryzom/client/src/user_entity.h @@ -479,7 +479,7 @@ public: ucstring getLoginName() { - if (_LoginName == ucstring("")) + if (_LoginName.empty()) _LoginName = getDisplayName(); return _LoginName; diff --git a/code/ryzom/common/src/game_share/scenario_entry_points.cpp b/code/ryzom/common/src/game_share/scenario_entry_points.cpp index 7c01af145..e97adb84c 100644 --- a/code/ryzom/common/src/game_share/scenario_entry_points.cpp +++ b/code/ryzom/common/src/game_share/scenario_entry_points.cpp @@ -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];