summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-12-25 03:08:37 +0300
committerAndrei Karas <akaras@inbox.ru>2012-12-25 03:08:37 +0300
commit39029943851dfc318fabb95357e00b81d2735547 (patch)
treedfd195791587c51e6dca166dda8a016a1760d3bf /src/client.cpp
parent10f59701112130cf953a2af7ef4ae82d9d823fe6 (diff)
downloadmanaplus-39029943851dfc318fabb95357e00b81d2735547.tar.gz
manaplus-39029943851dfc318fabb95357e00b81d2735547.tar.bz2
manaplus-39029943851dfc318fabb95357e00b81d2735547.tar.xz
manaplus-39029943851dfc318fabb95357e00b81d2735547.zip
Improve empty strings manipulation.
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/client.cpp b/src/client.cpp
index 2ec9c183c..7248aae43 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -1029,7 +1029,7 @@ int Client::gameExec()
if (loginData.remember)
loginData.username = serverConfig.getValue("username", "");
else
- loginData.username = "";
+ loginData.username.clear();
}
else
{
@@ -1543,7 +1543,7 @@ int Client::gameExec()
mCurrentDialog->addActionListener(&accountListener);
mCurrentDialog = nullptr; // OkDialog deletes itself
loginData.password = loginData.newPassword;
- loginData.newPassword = "";
+ loginData.newPassword.clear();
BLOCK_END("Client::gameExec STATE_CHANGEPASSWORD_SUCCESS")
break;
@@ -1716,7 +1716,7 @@ void Client::action(const gcn::ActionEvent &event)
return;
}
if (eventId == "Setup")
- tab = "";
+ tab.clear();
else if (eventId == "Video")
tab = "Video";
else if (eventId == "Themes")
@@ -1965,7 +1965,7 @@ void Client::initConfiguration() const
config.setValue("fpslimit", 60);
std::string defaultUpdateHost = branding.getValue("defaultUpdateHost", "");
if (!checkPath(defaultUpdateHost))
- defaultUpdateHost = "";
+ defaultUpdateHost.clear();
config.setValue("updatehost", defaultUpdateHost);
config.setValue("customcursor", true);
config.setValue("useScreenshotDirectorySuffix", true);
@@ -2163,7 +2163,7 @@ void Client::accountLogin(LoginData *const data) const
Net::getLoginHandler()->loginAccount(data);
// Clear the password, avoids auto login when returning to login
- data->password = "";
+ data->password.clear();
// TODO This is not the best place to save the config, but at least better
// than the login gui window