Changed: std::string already initialized to en empty string

--HG--
branch : hotfix
This commit is contained in:
kervala 2015-02-14 13:18:51 +01:00
parent 76e64fcb42
commit 1960f5c448
8 changed files with 17 additions and 17 deletions

View file

@ -2925,7 +2925,7 @@ void CInterfaceManager::initEmotes()
CSkillManager *pSM = CSkillManager::getInstance(); CSkillManager *pSM = CSkillManager::getInstance();
betaTester = pSM->isTitleUnblocked(CHARACTER_TITLE::FBT); betaTester = pSM->isTitleUnblocked(CHARACTER_TITLE::FBT);
string previousMind = ""; string previousMind;
CGroupSubMenu *pFirstMenu = 0; CGroupSubMenu *pFirstMenu = 0;
for (list<CEmoteEntry>::const_iterator it = entries.begin(); it != entries.end(); it++) for (list<CEmoteEntry>::const_iterator it = entries.begin(); it != entries.end(); it++)

View file

@ -85,7 +85,7 @@ static std::string sizeToHumanStd(uint64 size)
static std::string getVideoInfoDeviceName() static std::string getVideoInfoDeviceName()
{ {
uint64 version; uint64 version;
std::string ret = ""; std::string ret;
bool ok = CSystemInfo::getVideoInfo(ret, version); bool ok = CSystemInfo::getVideoInfo(ret, version);
if (ok) if (ok)
{ {

View file

@ -920,7 +920,7 @@ std::string getStringCategory(const ucstring &src, ucstring &dest, bool alwaysAd
std::string getStringCategoryIfAny(const ucstring &src, ucstring &dest) std::string getStringCategoryIfAny(const ucstring &src, ucstring &dest)
{ {
std::string colorCode = ""; std::string colorCode;
if (src.size() >= 3) if (src.size() >= 3)
{ {
uint startPos = 0; uint startPos = 0;

View file

@ -4109,7 +4109,7 @@ void CNetManagerMulti::init( const std::string& cookie, const std::string& addr
// //
uint32 ShardId = 0; uint32 ShardId = 0;
std::string WebServer = ""; std::string WebServer;

View file

@ -564,7 +564,7 @@ void CDisplayerVisualEntity::updateWorldMapPresence()
_MapDeco.setDisplayedInstance(getDisplayedInstance(), true); _MapDeco.setDisplayedInstance(getDisplayedInstance(), true);
// retrieve icon from the displayed object (lua code) // retrieve icon from the displayed object (lua code)
CLuaState &ls = getEditor().getLua(); CLuaState &ls = getEditor().getLua();
std::string texName = ""; std::string texName;
{ {
CLuaStackChecker lsc(&ls); CLuaStackChecker lsc(&ls);
if (getDisplayedInstance()->getLuaProjection().callMethodByNameNoThrow("getSelectBarIcon", 0, 1)) if (getDisplayedInstance()->getLuaProjection().callMethodByNameNoThrow("getSelectBarIcon", 0, 1))
@ -984,7 +984,7 @@ void CDisplayerVisualEntity::updateName()
break; break;
} }
} }
std::string firstPart = ""; std::string firstPart;
if(actNb>0) if(actNb>0)
firstPart = CI18N::get("uiR2EDDefaultActTitle").toString() + " " + NLMISC::toString(actNb); firstPart = CI18N::get("uiR2EDDefaultActTitle").toString() + " " + NLMISC::toString(actNb);

View file

@ -1116,12 +1116,12 @@ void CClientEditionModule::startingScenario(class NLNET::IModuleProxy * /* serve
uint32 myUserId = NetMngr.getUserId(); uint32 myUserId = NetMngr.getUserId();
std::string connectionState = ""; std::string connectionState;
if (myUserId == (charId>>4) || ClientCfg.Local) if (myUserId == (charId>>4) || ClientCfg.Local)
{ {
std::string errorMsg = ""; std::string errorMsg;
CObject* hlScenario = _Scenario->getHighLevel(); CObject* hlScenario = _Scenario->getHighLevel();
hlData.setData(hlScenario); // clone before modify by translateFeatures 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) void CClientEditionModule::loadScenarioSucceded(const std::string& filename, const std::string& body, const CScenarioValidator::TValues& values)
{ {
//H_AUTO(R2_CClientEditionModule_loadScenarioSucceded) //H_AUTO(R2_CClientEditionModule_loadScenarioSucceded)
string initialIsland="", initialEntryPoint="", initialSeason = ""; string initialIsland, initialEntryPoint, initialSeason;
string creatorMD5 = "", modifiedByMD5=""; string creatorMD5, modifiedByMD5;
string name = ""; string name;
string locked = ""; string locked;
for(uint i=0; i<values.size(); i++) for(uint i=0; i<values.size(); i++)
{ {
const std::pair<std::string, std::string>& pair = values[i]; const std::pair<std::string, std::string>& pair = values[i];

View file

@ -834,7 +834,7 @@ sint CComLuaModule::luaRequestEraseNode(lua_State* state)
if (args>2) { luaL_checknumber(state, 3); } if (args>2) { luaL_checknumber(state, 3); }
std::string instanceId(lua_tostring(state, 1)); std::string instanceId(lua_tostring(state, 1));
std::string attrName = ""; std::string attrName;
sint position = -1; sint position = -1;
if (args>1){ attrName = lua_tostring(state, 2);} if (args>1){ attrName = lua_tostring(state, 2);}
if (args>2){ position = static_cast<sint>(lua_tonumber(state, 3));} if (args>2){ position = static_cast<sint>(lua_tonumber(state, 3));}
@ -1255,7 +1255,7 @@ CObject* CComLuaModule::getObjectFromLua(lua_State* state, sint idx)
lua_pushnil(state); lua_pushnil(state);
while (lua_next(state, -2) != 0) while (lua_next(state, -2) != 0)
{ {
std::string key = ""; std::string key;
if ( lua_type(state, -2) == LUA_TSTRING) if ( lua_type(state, -2) == LUA_TSTRING)
{ {
key = lua_tostring(state, -2); 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) CObject* CComLuaModule::loadLocal(const std::string& filename, const CScenarioValidator::TValues& values)
{ {
CScenarioValidator::TValues::const_iterator first(values.begin()), last(values.end()); CScenarioValidator::TValues::const_iterator first(values.begin()), last(values.end());
std::string name = ""; std::string name;
for (; first != last; ++first) for (; first != last; ++first)
{ {
if (first->first == "Name" ) { name = first->second; } 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) 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()); CScenarioValidator::TValues::const_iterator first(values.begin()), last(values.end());
std::string name = ""; std::string name;
for (; first != last; ++first) for (; first != last; ++first)
{ {
if (first->first == "Name" ) { name = first->second; } if (first->first == "Name" ) { name = first->second; }

View file

@ -267,7 +267,7 @@ void CDynamicMapClient::save(const std::string& /* filename */)
void CDynamicMapClient::saveRtData(const std::string& filename) void CDynamicMapClient::saveRtData(const std::string& filename)
{ {
//H_AUTO(R2_CDynamicMapClient_saveRtData) //H_AUTO(R2_CDynamicMapClient_saveRtData)
std::string name = ""; std::string name;
name += filename; name += filename;
//std::ostringstream out2; //std::ostringstream out2;
std::string out2; std::string out2;