rename var resumeDownloaded to resumeDownloaded.

This commit is contained in:
江龙 2015-09-08 16:38:02 +08:00
parent 8daf026c6c
commit d6934cfc4b
4 changed files with 6 additions and 6 deletions

View File

@ -61,8 +61,8 @@ static int _downloadProgressFunc(void* userdata, double totalToDownload, double
// then it do not need to do callback notification, so the exclusion of this situation, avoid subsequent judgment exception
if (totalToDownload != 0)
{
totalToDownload += downloadUnit->resumeDownloaded;
nowDownloaded += downloadUnit->resumeDownloaded;
totalToDownload += downloadUnit->resumeDownloadedSize;
nowDownloaded += downloadUnit->resumeDownloadedSize;
}
this_->getProgressCallback()(downloadUnit, totalToDownload, nowDownloaded);
@ -187,7 +187,7 @@ int DownloaderImpl::performBatchDownload(const DownloadUnits& units,
if (size != -1)
{
curl_easy_setopt(curl, CURLOPT_RESUME_FROM_LARGE, size);
unit.resumeDownloaded = size;
unit.resumeDownloadedSize = size;
}
}

View File

@ -59,7 +59,7 @@ namespace network
// additional info created by CCDownloader
mutable void* fp;
mutable bool resumeDownload;
mutable double resumeDownloaded;
mutable double resumeDownloadedSize;
mutable double downloaded;
mutable double totalToDownload;
mutable void *_reserved;

View File

@ -603,7 +603,7 @@ void AssetsManagerEx::startUpdate()
unit.srcUrl = packageUrl + path;
unit.storagePath = _storagePath + path;
unit.resumeDownload = false;
unit.resumeDownloaded = 0;
unit.resumeDownloadedSize = 0;
_downloadUnits.emplace(unit.customId, unit);
}
}

View File

@ -221,7 +221,7 @@ void Manifest::genResumeAssetsList(network::DownloadUnits *units) const
unit.customId = it->first;
unit.srcUrl = _packageUrl + asset.path;
unit.storagePath = _manifestRoot + asset.path;
unit.resumeDownloaded = 0;
unit.resumeDownloadedSize = 0;
if (asset.downloadState == DownloadState::DOWNLOADING)
{
unit.resumeDownload = true;