From af98cb5dea5644e0d95a5bf41c03655e4ab808ef Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 7 Oct 2011 22:28:26 +0300 Subject: Fix code style. --- src/net/download.cpp | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) (limited to 'src/net/download.cpp') diff --git a/src/net/download.cpp b/src/net/download.cpp index 93417197e..969318b19 100644 --- a/src/net/download.cpp +++ b/src/net/download.cpp @@ -49,17 +49,17 @@ namespace Net { Download::Download(void *ptr, const std::string &url, - DownloadUpdate updateFunction, bool ignoreError): - mPtr(ptr), - mUrl(url), - mFileName(""), - mWriteFunction(NULL), - mAdler(0), - mUpdateFunction(updateFunction), - mThread(NULL), - mCurl(NULL), - mHeaders(NULL), - mIgnoreError(ignoreError) + DownloadUpdate updateFunction, bool ignoreError) : + mPtr(ptr), + mUrl(url), + mFileName(""), + mWriteFunction(NULL), + mAdler(0), + mUpdateFunction(updateFunction), + mThread(NULL), + mCurl(NULL), + mHeaders(NULL), + mIgnoreError(ignoreError) { mError = static_cast(calloc(CURL_ERROR_SIZE + 1, 1)); mError[0] = 0; @@ -72,6 +72,7 @@ Download::~Download() if (mHeaders) curl_slist_free_all(mHeaders); + mHeaders = 0; int status; if (mThread && SDL_GetThreadID(mThread)) SDL_WaitThread(mThread, &status); @@ -261,7 +262,7 @@ int Download::downloadThread(void *ptr) case CURLE_COULDNT_CONNECT: default: logger->log("curl error %d: %s host: %s", - res, d->mError, d->mUrl.c_str()); + res, d->mError, d->mUrl.c_str()); break; } -- cgit v1.2.3-60-g2f50