From f4fe732ccbd65fd584b7787f3b5aec904a85d11b Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 21 May 2014 12:28:40 +0300 Subject: Fix code style. --- src/net/download.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'src/net/download.cpp') diff --git a/src/net/download.cpp b/src/net/download.cpp index c61e42e0c..011182a7e 100644 --- a/src/net/download.cpp +++ b/src/net/download.cpp @@ -202,7 +202,7 @@ bool Download::start() logger->log1(DOWNLOAD_ERROR_MESSAGE_THREAD); if (mError) strcpy(mError, DOWNLOAD_ERROR_MESSAGE_THREAD); - mUpdateFunction(mPtr, DownloadStatus::THREAD_ERROR, 0, 0); + mUpdateFunction(mPtr, DownloadStatus::ThreadError, 0, 0); if (!mIgnoreError) return false; } @@ -239,12 +239,12 @@ int Download::downloadProgress(void *clientp, double dltotal, double dlnow, if (d->mOptions.cancel) { - return d->mUpdateFunction(d->mPtr, DownloadStatus::CANCELLED, + return d->mUpdateFunction(d->mPtr, DownloadStatus::Cancelled, static_cast(dltotal), static_cast(dlnow)); } - return d->mUpdateFunction(d->mPtr, DownloadStatus::IDLE, + return d->mUpdateFunction(d->mPtr, DownloadStatus::Idle, static_cast(dltotal), static_cast(dlnow)); } @@ -283,7 +283,7 @@ int Download::downloadThread(void *ptr) logger->log_r("selected url: %s", d->mUrl.c_str()); while (attempts < 3 && !complete && !d->mOptions.cancel) { - d->mUpdateFunction(d->mPtr, DownloadStatus::STARTING, 0, 0); + d->mUpdateFunction(d->mPtr, DownloadStatus::Starting, 0, 0); if (d->mOptions.cancel) { @@ -372,7 +372,7 @@ int Download::downloadThread(void *ptr) if (d->mOptions.cancel) break; -// d->mUpdateFunction(d->mPtr, DownloadStatus::ERROR, 0, 0); +// d->mUpdateFunction(d->mPtr, DownloadStatus::Error, 0, 0); if (file) { @@ -495,11 +495,11 @@ int Download::downloadThread(void *ptr) } else if (!complete || attempts >= 3) { - d->mUpdateFunction(d->mPtr, DownloadStatus::ERROR, 0, 0); + d->mUpdateFunction(d->mPtr, DownloadStatus::Error, 0, 0); } else { - d->mUpdateFunction(d->mPtr, DownloadStatus::COMPLETE, 0, 0); + d->mUpdateFunction(d->mPtr, DownloadStatus::Complete, 0, 0); } return 0; -- cgit v1.2.3-70-g09d2