From 4df121e6dcdf53436f50ce81dd60096ce0138a2c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 1 Sep 2012 20:49:03 +0300 Subject: Add const to more classes. --- src/logger.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/logger.cpp') diff --git a/src/logger.cpp b/src/logger.cpp index df938c5f3..2ccd8398f 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -108,7 +108,7 @@ void Logger::dlog(std::string str) debugChatTab->chatLog(str, BY_LOGGER); } -void Logger::log1(const char *buf) +void Logger::log1(const char *const buf) { // Get the current system time timeval tv; @@ -140,7 +140,7 @@ void Logger::log1(const char *buf) debugChatTab->chatLog(buf, BY_LOGGER); } -void Logger::log(const char *log_text, ...) +void Logger::log(const char *const log_text, ...) { unsigned size = 1024; char* buf = nullptr; @@ -207,7 +207,7 @@ void Logger::safeError(const std::string &error_text) // (ConstStr255Param) msg, nullptr, nullptr); #elif defined(__linux__) || defined(__linux) std::cerr << "Error: " << error_text << std::endl; - std::string msg = "xmessage \"" + error_text + "\""; + const std::string msg = "xmessage \"" + error_text + "\""; if (system(msg.c_str()) == -1) std::cerr << "Error: " << error_text << std::endl; #else @@ -234,7 +234,7 @@ void Logger::error(const std::string &error_text) // (ConstStr255Param) msg, nullptr, nullptr); #elif defined(__linux__) || defined(_linux) std::cerr << "Error: " << error_text << std::endl; - std::string msg = "xmessage \"Error happend. " + const std::string msg = "xmessage \"Error happend. " "Please see log file for more information.\""; if (system(msg.c_str()) == -1) std::cerr << "Error: " << error_text << std::endl; -- cgit v1.2.3-70-g09d2