From 9e83411f7e4147d09af5a5006888dcc187ea0ef8 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 7 Nov 2011 19:34:52 +0300 Subject: Fix some warnings under gcc 4.7. --- src/logger.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/logger.cpp') diff --git a/src/logger.cpp b/src/logger.cpp index 8ce92c6d6..129a8a884 100644 --- a/src/logger.cpp +++ b/src/logger.cpp @@ -43,7 +43,7 @@ Logger::Logger(): mLogToStandardOut(true), - mChatWindow(NULL), + mChatWindow(nullptr), mDebugLog(false) { } @@ -80,7 +80,7 @@ void Logger::dlog(std::string str) // Get the current system time timeval tv; - gettimeofday(&tv, NULL); + gettimeofday(&tv, nullptr); // Print the log entry std::stringstream timeStr; @@ -112,7 +112,7 @@ void Logger::log1(const char *buf) { // Get the current system time timeval tv; - gettimeofday(&tv, NULL); + gettimeofday(&tv, nullptr); // Print the log entry std::stringstream timeStr; @@ -158,7 +158,7 @@ void Logger::log(const char *log_text, ...) // Get the current system time timeval tv; - gettimeofday(&tv, NULL); + gettimeofday(&tv, nullptr); // Print the log entry std::stringstream timeStr; @@ -193,17 +193,17 @@ void Logger::error(const std::string &error_text) { log("Error: %s", error_text.c_str()); #ifdef WIN32 - MessageBox(NULL, error_text.c_str(), "Error", MB_ICONERROR | MB_OK); + MessageBox(nullptr, error_text.c_str(), "Error", MB_ICONERROR | MB_OK); #elif defined __APPLE__ // Str255 msg; // CFStringRef error; -// error = CFStringCreateWithCString(NULL, +// error = CFStringCreateWithCString(nullptr, // error_text.c_str(), // kCFStringEncodingMacRoman); // CFStringGetPascalString(error, msg, 255, kCFStringEncodingMacRoman); // StandardAlert(kAlertStopAlert, // (const unsigned char*)"\pError", -// (ConstStr255Param) msg, NULL, NULL); +// (ConstStr255Param) msg, nullptr, nullptr); #elif defined __linux__ || __linux std::cerr << "Error: " << error_text << std::endl; std::string msg = "xmessage \"" + error_text + "\""; -- cgit v1.2.3-60-g2f50