diff options
author | Andrei Karas <akaras@inbox.ru> | 2011-11-07 19:34:52 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2011-11-07 19:34:52 +0300 |
commit | 9e83411f7e4147d09af5a5006888dcc187ea0ef8 (patch) | |
tree | c084bdf8afabc6220779645dcb5dbf71af6a151f /src/gui/whoisonline.cpp | |
parent | bc7d91cc0c9c0f6dcad01d612932c6899afb5514 (diff) | |
download | manaverse-9e83411f7e4147d09af5a5006888dcc187ea0ef8.tar.gz manaverse-9e83411f7e4147d09af5a5006888dcc187ea0ef8.tar.bz2 manaverse-9e83411f7e4147d09af5a5006888dcc187ea0ef8.tar.xz manaverse-9e83411f7e4147d09af5a5006888dcc187ea0ef8.zip |
Fix some warnings under gcc 4.7.
Diffstat (limited to 'src/gui/whoisonline.cpp')
-rw-r--r-- | src/gui/whoisonline.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/gui/whoisonline.cpp b/src/gui/whoisonline.cpp index 3fb63a105..b6d67fa83 100644 --- a/src/gui/whoisonline.cpp +++ b/src/gui/whoisonline.cpp @@ -83,11 +83,11 @@ class NameFunctuator WhoIsOnline::WhoIsOnline(): Window(_("Who Is Online - Updating"), false, 0, "whoisonline.xml"), - mThread(NULL), + mThread(nullptr), mDownloadStatus(UPDATE_LIST), mDownloadComplete(true), mDownloadedBytes(0), - mMemoryBuffer(NULL), + mMemoryBuffer(nullptr), mCurlError(new char[CURL_ERROR_SIZE]), mAllowUpdate(true), mShowLevel(false) @@ -137,7 +137,7 @@ WhoIsOnline::~WhoIsOnline() config.removeListener("updateOnlineList", this); if (mThread && SDL_GetThreadID(mThread)) - SDL_WaitThread(mThread, NULL); + SDL_WaitThread(mThread, nullptr); free(mMemoryBuffer); mMemoryBuffer = 0; @@ -206,7 +206,7 @@ void WhoIsOnline::loadList() mShowLevel = config.getBoolValue("showlevel"); - while (line != NULL) + while (line) { std::string nick; lineStr = line; @@ -295,7 +295,7 @@ void WhoIsOnline::loadList() { listStarted = true; } - line = strtok(NULL, "\n"); + line = strtok(nullptr, "\n"); } //Set window caption @@ -448,12 +448,12 @@ void WhoIsOnline::download() { mDownloadComplete = true; if (mThread && SDL_GetThreadID(mThread)) - SDL_WaitThread(mThread, NULL); + SDL_WaitThread(mThread, nullptr); mDownloadComplete = false; mThread = SDL_CreateThread(WhoIsOnline::downloadThread, this); - if (mThread == NULL) + if (mThread == nullptr) mDownloadStatus = UPDATE_ERROR; } @@ -525,8 +525,8 @@ void WhoIsOnline::action(const gcn::ActionEvent &event) setCaption(_("Who Is Online - Update")); if (mThread && SDL_GetThreadID(mThread)) { - SDL_WaitThread(mThread, NULL); - mThread = NULL; + SDL_WaitThread(mThread, nullptr); + mThread = nullptr; } mDownloadComplete = true; } |