diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-01 20:49:03 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-02 00:37:51 +0300 |
commit | 4df121e6dcdf53436f50ce81dd60096ce0138a2c (patch) | |
tree | 7cadc707bb49e4c148ba9c182075697a9643e20a /src/logger.cpp | |
parent | ed3410d7eb61593a2235ddba97ce257c85e405a6 (diff) | |
download | manaplus-4df121e6dcdf53436f50ce81dd60096ce0138a2c.tar.gz manaplus-4df121e6dcdf53436f50ce81dd60096ce0138a2c.tar.bz2 manaplus-4df121e6dcdf53436f50ce81dd60096ce0138a2c.tar.xz manaplus-4df121e6dcdf53436f50ce81dd60096ce0138a2c.zip |
Add const to more classes.
Diffstat (limited to 'src/logger.cpp')
-rw-r--r-- | src/logger.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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; |