diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-05 15:55:55 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-05 15:55:55 +0300 |
commit | d1bb1b375d657f0821ccfebf18fa1c3873314690 (patch) | |
tree | eb83bbf7242b2c367c4df19113f37f6c6ab9faa2 /src/client.cpp | |
parent | 9f87b4c92e3a4d524250dbbb376cd0f59b7d995e (diff) | |
download | manaverse-d1bb1b375d657f0821ccfebf18fa1c3873314690.tar.gz manaverse-d1bb1b375d657f0821ccfebf18fa1c3873314690.tar.bz2 manaverse-d1bb1b375d657f0821ccfebf18fa1c3873314690.tar.xz manaverse-d1bb1b375d657f0821ccfebf18fa1c3873314690.zip |
Fix useless variables initialisations.
Diffstat (limited to 'src/client.cpp')
-rw-r--r-- | src/client.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/client.cpp b/src/client.cpp index 43d5650bb..7afe24cb2 100644 --- a/src/client.cpp +++ b/src/client.cpp @@ -1732,11 +1732,10 @@ void Client::initServerConfig(std::string serverName) logger->error(strprintf(_("%s doesn't exist and can't be created! " "Exiting."), mServerConfigDir.c_str())); } - FILE *configFile = nullptr; std::string configPath; configPath = mServerConfigDir + "/config.xml"; - configFile = fopen(configPath.c_str(), "r"); + FILE *configFile = fopen(configPath.c_str(), "r"); if (!configFile) { configFile = fopen(configPath.c_str(), "wt"); @@ -1803,7 +1802,6 @@ void Client::initConfiguration() const // Checking if the configuration file exists... otherwise create it with // default options. - FILE *configFile = nullptr; std::string configPath; // bool oldConfig = false; // int emptySize = config.getSize(); @@ -1813,7 +1811,7 @@ void Client::initConfiguration() const else configPath = mConfigDir + "/test.xml"; - configFile = fopen(configPath.c_str(), "r"); + FILE *configFile = fopen(configPath.c_str(), "r"); // If we can't read it, it doesn't exist ! if (!configFile) @@ -1995,9 +1993,7 @@ void Client::accountLogin(LoginData *const data) const bool Client::copyFile(const std::string &configPath, const std::string &oldConfigPath) const { - FILE *configFile = nullptr; - - configFile = fopen(oldConfigPath.c_str(), "r"); + FILE *configFile = fopen(oldConfigPath.c_str(), "r"); if (configFile) { |