summaryrefslogtreecommitdiff
path: root/src/client.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-01 20:49:03 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-02 00:37:51 +0300
commit4df121e6dcdf53436f50ce81dd60096ce0138a2c (patch)
tree7cadc707bb49e4c148ba9c182075697a9643e20a /src/client.cpp
parented3410d7eb61593a2235ddba97ce257c85e405a6 (diff)
downloadmanaplus-4df121e6dcdf53436f50ce81dd60096ce0138a2c.tar.gz
manaplus-4df121e6dcdf53436f50ce81dd60096ce0138a2c.tar.bz2
manaplus-4df121e6dcdf53436f50ce81dd60096ce0138a2c.tar.xz
manaplus-4df121e6dcdf53436f50ce81dd60096ce0138a2c.zip
Add const to more classes.
Diffstat (limited to 'src/client.cpp')
-rw-r--r--src/client.cpp25
1 files changed, 3 insertions, 22 deletions
diff --git a/src/client.cpp b/src/client.cpp
index c16d26aa6..468f06f10 100644
--- a/src/client.cpp
+++ b/src/client.cpp
@@ -568,7 +568,7 @@ void Client::gameInit()
sound.setSfxVolume(config.getIntValue("sfxVolume"));
sound.setMusicVolume(config.getIntValue("musicVolume"));
}
- catch (const char *err)
+ catch (const char *const err)
{
mState = STATE_ERROR;
errorMessage = err;
@@ -2013,25 +2013,6 @@ bool Client::copyFile(const std::string &configPath,
return false;
}
-bool Client::createConfig(std::string &configPath)
-{
- std::string oldHomeDir;
-#ifdef __APPLE__
- // Use Application Directory instead of .mana
- oldHomeDir = std::string(PHYSFS_getUserDir()) +
- "/Library/Application Support/" +
- branding.getValue("appName", "ManaPlus");
-#else
- oldHomeDir = std::string(PHYSFS_getUserDir()) +
- "/." + branding.getValue("appShort", "mana");
-#endif
-
- oldHomeDir += "/config.xml";
-
- logger->log("Restore config from: " + configPath);
- return copyFile(configPath, oldHomeDir);
-}
-
void Client::storeSafeParameters() const
{
bool tmpHwaccel;
@@ -2342,7 +2323,7 @@ bool Client::checkPackets(const int type)
return true;
PacketLimit &limit = instance()->mPacketLimits[type];
- int timeLimit = limit.timeLimit;
+ const int timeLimit = limit.timeLimit;
if (!timeLimit)
return true;
@@ -2384,7 +2365,7 @@ bool Client::limitPackets(const int type)
if (!serverConfig.getValueBool("enableBuggyServers", true))
return true;
- int timeLimit = instance()->mPacketLimits[type].timeLimit;
+ const int timeLimit = instance()->mPacketLimits[type].timeLimit;
if (!timeLimit)
return true;