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/net/download.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'src/net/download.cpp') diff --git a/src/net/download.cpp b/src/net/download.cpp index 969318b19..dcce218a9 100644 --- a/src/net/download.cpp +++ b/src/net/download.cpp @@ -53,12 +53,12 @@ Download::Download(void *ptr, const std::string &url, mPtr(ptr), mUrl(url), mFileName(""), - mWriteFunction(NULL), + mWriteFunction(nullptr), mAdler(0), mUpdateFunction(updateFunction), - mThread(NULL), - mCurl(NULL), - mHeaders(NULL), + mThread(nullptr), + mCurl(nullptr), + mHeaders(nullptr), mIgnoreError(ignoreError) { mError = static_cast(calloc(CURL_ERROR_SIZE + 1, 1)); @@ -158,9 +158,9 @@ void Download::cancel() mOptions.cancel = true; if (mThread && SDL_GetThreadID(mThread)) - SDL_WaitThread(mThread, NULL); + SDL_WaitThread(mThread, nullptr); - mThread = NULL; + mThread = nullptr; } char *Download::getError() @@ -204,14 +204,14 @@ int Download::downloadThread(void *ptr) while (attempts < 3 && !complete && !d->mOptions.cancel) { - FILE *file = NULL; + FILE *file = nullptr; d->mUpdateFunction(d->mPtr, DOWNLOAD_STATUS_STARTING, 0, 0); if (d->mOptions.cancel) { //need terminate thread? - d->mThread = NULL; + d->mThread = nullptr; return 0; } @@ -335,7 +335,7 @@ int Download::downloadThread(void *ptr) if (d->mOptions.cancel) { //need ternibate thread? - d->mThread = NULL; + d->mThread = nullptr; return 0; } attempts++; @@ -354,7 +354,7 @@ int Download::downloadThread(void *ptr) d->mUpdateFunction(d->mPtr, DOWNLOAD_STATUS_COMPLETE, 0, 0); } - d->mThread = NULL; + d->mThread = nullptr; return 0; } -- cgit v1.2.3-70-g09d2