From 5b1926aeb4f28e70df91ac17972cba7470618bad Mon Sep 17 00:00:00 2001 From: kervala Date: Sat, 14 Feb 2015 13:18:51 +0100 Subject: [PATCH] Changed: std::string already initialized to en empty string --- .../client/src/interface_v3/interface_manager.cpp | 2 +- code/ryzom/client/src/login_progress_post_thread.cpp | 2 +- code/ryzom/client/src/misc.cpp | 2 +- code/ryzom/client/src/net_manager.cpp | 2 +- code/ryzom/client/src/r2/displayer_visual_entity.cpp | 4 ++-- .../client/src/r2/dmc/client_edition_module.cpp | 12 ++++++------ code/ryzom/client/src/r2/dmc/com_lua_module.cpp | 8 ++++---- code/ryzom/client/src/r2/dmc/dmc.cpp | 2 +- 8 files changed, 17 insertions(+), 17 deletions(-) diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index b89566ecd..6f4f31d14 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -2925,7 +2925,7 @@ void CInterfaceManager::initEmotes() CSkillManager *pSM = CSkillManager::getInstance(); betaTester = pSM->isTitleUnblocked(CHARACTER_TITLE::FBT); - string previousMind = ""; + string previousMind; CGroupSubMenu *pFirstMenu = 0; for (list::const_iterator it = entries.begin(); it != entries.end(); it++) diff --git a/code/ryzom/client/src/login_progress_post_thread.cpp b/code/ryzom/client/src/login_progress_post_thread.cpp index bc833fb04..76ce9c2e3 100644 --- a/code/ryzom/client/src/login_progress_post_thread.cpp +++ b/code/ryzom/client/src/login_progress_post_thread.cpp @@ -85,7 +85,7 @@ static std::string sizeToHumanStd(uint64 size) static std::string getVideoInfoDeviceName() { uint64 version; - std::string ret = ""; + std::string ret; bool ok = CSystemInfo::getVideoInfo(ret, version); if (ok) { diff --git a/code/ryzom/client/src/misc.cpp b/code/ryzom/client/src/misc.cpp index 9adf00a9a..7e018a576 100644 --- a/code/ryzom/client/src/misc.cpp +++ b/code/ryzom/client/src/misc.cpp @@ -920,7 +920,7 @@ std::string getStringCategory(const ucstring &src, ucstring &dest, bool alwaysAd std::string getStringCategoryIfAny(const ucstring &src, ucstring &dest) { - std::string colorCode = ""; + std::string colorCode; if (src.size() >= 3) { uint startPos = 0; diff --git a/code/ryzom/client/src/net_manager.cpp b/code/ryzom/client/src/net_manager.cpp index 4b37b698a..0d369fe85 100644 --- a/code/ryzom/client/src/net_manager.cpp +++ b/code/ryzom/client/src/net_manager.cpp @@ -4109,7 +4109,7 @@ void CNetManagerMulti::init( const std::string& cookie, const std::string& addr // uint32 ShardId = 0; -std::string WebServer = ""; +std::string WebServer; diff --git a/code/ryzom/client/src/r2/displayer_visual_entity.cpp b/code/ryzom/client/src/r2/displayer_visual_entity.cpp index 37632f4d4..5bc8638f0 100644 --- a/code/ryzom/client/src/r2/displayer_visual_entity.cpp +++ b/code/ryzom/client/src/r2/displayer_visual_entity.cpp @@ -564,7 +564,7 @@ void CDisplayerVisualEntity::updateWorldMapPresence() _MapDeco.setDisplayedInstance(getDisplayedInstance(), true); // retrieve icon from the displayed object (lua code) CLuaState &ls = getEditor().getLua(); - std::string texName = ""; + std::string texName; { CLuaStackChecker lsc(&ls); if (getDisplayedInstance()->getLuaProjection().callMethodByNameNoThrow("getSelectBarIcon", 0, 1)) @@ -984,7 +984,7 @@ void CDisplayerVisualEntity::updateName() break; } } - std::string firstPart = ""; + std::string firstPart; if(actNb>0) firstPart = CI18N::get("uiR2EDDefaultActTitle").toString() + " " + NLMISC::toString(actNb); diff --git a/code/ryzom/client/src/r2/dmc/client_edition_module.cpp b/code/ryzom/client/src/r2/dmc/client_edition_module.cpp index 0a5f74cc5..93978800d 100644 --- a/code/ryzom/client/src/r2/dmc/client_edition_module.cpp +++ b/code/ryzom/client/src/r2/dmc/client_edition_module.cpp @@ -1116,12 +1116,12 @@ void CClientEditionModule::startingScenario(class NLNET::IModuleProxy * /* serve uint32 myUserId = NetMngr.getUserId(); - std::string connectionState = ""; + std::string connectionState; if (myUserId == (charId>>4) || ClientCfg.Local) { - std::string errorMsg = ""; + std::string errorMsg; CObject* hlScenario = _Scenario->getHighLevel(); hlData.setData(hlScenario); // clone before modify by translateFeatures @@ -2425,10 +2425,10 @@ bool CClientEditionModule::addToLoadList( const std::string& filename, CScenario void CClientEditionModule::loadScenarioSucceded(const std::string& filename, const std::string& body, const CScenarioValidator::TValues& values) { //H_AUTO(R2_CClientEditionModule_loadScenarioSucceded) - string initialIsland="", initialEntryPoint="", initialSeason = ""; - string creatorMD5 = "", modifiedByMD5=""; - string name = ""; - string locked = ""; + string initialIsland, initialEntryPoint, initialSeason; + string creatorMD5, modifiedByMD5; + string name; + string locked; for(uint i=0; i& pair = values[i]; diff --git a/code/ryzom/client/src/r2/dmc/com_lua_module.cpp b/code/ryzom/client/src/r2/dmc/com_lua_module.cpp index c9b6a6df2..b73813786 100644 --- a/code/ryzom/client/src/r2/dmc/com_lua_module.cpp +++ b/code/ryzom/client/src/r2/dmc/com_lua_module.cpp @@ -834,7 +834,7 @@ sint CComLuaModule::luaRequestEraseNode(lua_State* state) if (args>2) { luaL_checknumber(state, 3); } std::string instanceId(lua_tostring(state, 1)); - std::string attrName = ""; + std::string attrName; sint position = -1; if (args>1){ attrName = lua_tostring(state, 2);} if (args>2){ position = static_cast(lua_tonumber(state, 3));} @@ -1255,7 +1255,7 @@ CObject* CComLuaModule::getObjectFromLua(lua_State* state, sint idx) lua_pushnil(state); while (lua_next(state, -2) != 0) { - std::string key = ""; + std::string key; if ( lua_type(state, -2) == LUA_TSTRING) { key = lua_tostring(state, -2); @@ -1285,7 +1285,7 @@ CObject* CComLuaModule::getObjectFromLua(lua_State* state, sint idx) CObject* CComLuaModule::loadLocal(const std::string& filename, const CScenarioValidator::TValues& values) { CScenarioValidator::TValues::const_iterator first(values.begin()), last(values.end()); - std::string name = ""; + std::string name; for (; first != last; ++first) { if (first->first == "Name" ) { name = first->second; } @@ -1347,7 +1347,7 @@ bool CComLuaModule::loadUserComponent(const std::string& filename) CObject* CComLuaModule::loadFromBuffer(const std::string& data, const std::string& filename, const CScenarioValidator::TValues& values) { CScenarioValidator::TValues::const_iterator first(values.begin()), last(values.end()); - std::string name = ""; + std::string name; for (; first != last; ++first) { if (first->first == "Name" ) { name = first->second; } diff --git a/code/ryzom/client/src/r2/dmc/dmc.cpp b/code/ryzom/client/src/r2/dmc/dmc.cpp index 4642dfa10..0659f0a56 100644 --- a/code/ryzom/client/src/r2/dmc/dmc.cpp +++ b/code/ryzom/client/src/r2/dmc/dmc.cpp @@ -267,7 +267,7 @@ void CDynamicMapClient::save(const std::string& /* filename */) void CDynamicMapClient::saveRtData(const std::string& filename) { //H_AUTO(R2_CDynamicMapClient_saveRtData) - std::string name = ""; + std::string name; name += filename; //std::ostringstream out2; std::string out2;