From 84e56a88817f7178b4895e2adf863b4d98b42e64 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 25 Aug 2012 20:12:27 +0300 Subject: Add const to other classes. --- src/chatlogger.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/chatlogger.cpp') 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 &list, - unsigned n) + const unsigned n) const { std::ifstream logFile; std::string fileName = strprintf("%s/%s.log", getDir().c_str(), -- cgit v1.2.3-60-g2f50