summaryrefslogtreecommitdiff
path: root/src/net/download.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-02-07 16:18:13 +0300
committerAndrei Karas <akaras@inbox.ru>2016-02-07 16:18:13 +0300
commit9fe21fcd8883b37bdc30224822e6e42afb35b8f0 (patch)
tree798117abd4dc7e610997d59d530a96ddc1509f53 /src/net/download.cpp
parent4429cb14e9e187edef27aba692a4266733f79c17 (diff)
downloadplus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.gz
plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.bz2
plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.tar.xz
plus-9fe21fcd8883b37bdc30224822e6e42afb35b8f0.zip
Replace most static_cast<Type> to shorter versions from defines.
Diffstat (limited to 'src/net/download.cpp')
-rw-r--r--src/net/download.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/net/download.cpp b/src/net/download.cpp
index dd3b9eaeb..209b6085e 100644
--- a/src/net/download.cpp
+++ b/src/net/download.cpp
@@ -144,7 +144,7 @@ unsigned long Download::fadler32(FILE *const file)
rewind(file);
// Calculate Adler-32 checksum
- char *const buffer = new char[static_cast<size_t>(fileSize)];
+ char *const buffer = new char[CAST_SIZE(fileSize)];
const uInt read = static_cast<uInt>(fread(buffer, 1, fileSize, file));
unsigned long adler = adler32(0L, Z_NULL, 0);
adler = adler32(static_cast<uInt>(adler),
@@ -242,13 +242,13 @@ int Download::downloadProgress(void *clientp, double dltotal, double dlnow,
if (d->mOptions.cancel)
{
return d->mUpdateFunction(d->mPtr, DownloadStatus::Cancelled,
- static_cast<size_t>(dltotal),
- static_cast<size_t>(dlnow));
+ CAST_SIZE(dltotal),
+ CAST_SIZE(dlnow));
}
return d->mUpdateFunction(d->mPtr, DownloadStatus::Idle,
- static_cast<size_t>(dltotal),
- static_cast<size_t>(dlnow));
+ CAST_SIZE(dltotal),
+ CAST_SIZE(dlnow));
}
int Download::downloadThread(void *ptr)