summaryrefslogtreecommitdiff
path: root/src/chatlogger.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-25 20:12:27 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-25 20:12:27 +0300
commit84e56a88817f7178b4895e2adf863b4d98b42e64 (patch)
tree794e0099ca9f749fb0b6b65b96acdb7ce5e97ef9 /src/chatlogger.cpp
parent4a21e45a63137009a654a212ea7512ecc2846648 (diff)
downloadmanaverse-84e56a88817f7178b4895e2adf863b4d98b42e64.tar.gz
manaverse-84e56a88817f7178b4895e2adf863b4d98b42e64.tar.bz2
manaverse-84e56a88817f7178b4895e2adf863b4d98b42e64.tar.xz
manaverse-84e56a88817f7178b4895e2adf863b4d98b42e64.zip
Add const to other classes.
Diffstat (limited to 'src/chatlogger.cpp')
-rw-r--r--src/chatlogger.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/chatlogger.cpp b/src/chatlogger.cpp
index 5324b2ebf..8d12852a5 100644
--- a/src/chatlogger.cpp
+++ b/src/chatlogger.cpp
@@ -80,7 +80,7 @@ void ChatLogger::setLogDir(const std::string &logDir)
if (mLogFile.is_open())
mLogFile.close();
- DIR *dir = opendir(mLogDir.c_str());
+ DIR *const dir = opendir(mLogDir.c_str());
if (!dir)
mkdir_r(mLogDir.c_str());
else
@@ -172,7 +172,7 @@ void ChatLogger::setServerName(const std::string &serverName)
secureName(mServerName);
if (mLogDir != "")
{
- DIR *dir = opendir((mLogDir + PHYSFS_getDirSeparator()
+ DIR *const dir = opendir((mLogDir + PHYSFS_getDirSeparator()
+ mServerName).c_str());
if (!dir)
{
@@ -187,7 +187,7 @@ void ChatLogger::setServerName(const std::string &serverName)
}
void ChatLogger::loadLast(std::string name, std::list<std::string> &list,
- unsigned n)
+ const unsigned n) const
{
std::ifstream logFile;
std::string fileName = strprintf("%s/%s.log", getDir().c_str(),