summaryrefslogtreecommitdiff
path: root/src/net/download.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-01 23:56:03 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-02 14:28:17 +0300
commit520a495c466793c29f3e721634dfe6cc616b8ede (patch)
tree749b67f5d4df83f6f4997dabeb66ec394eabccd7 /src/net/download.cpp
parentf9030497b6196ce2fadb6b6ada5d784be227d9a6 (diff)
downloadplus-520a495c466793c29f3e721634dfe6cc616b8ede.tar.gz
plus-520a495c466793c29f3e721634dfe6cc616b8ede.tar.bz2
plus-520a495c466793c29f3e721634dfe6cc616b8ede.tar.xz
plus-520a495c466793c29f3e721634dfe6cc616b8ede.zip
Add missing const.
Diffstat (limited to 'src/net/download.cpp')
-rw-r--r--src/net/download.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/net/download.cpp b/src/net/download.cpp
index cf5a1d0b3..86a6a88e8 100644
--- a/src/net/download.cpp
+++ b/src/net/download.cpp
@@ -138,8 +138,6 @@ unsigned long Download::fadler32(FILE *const file)
// Calculate Adler-32 checksum
char *const buffer = new char[fileSize];
- if (!buffer)
- return 0;
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),
@@ -148,7 +146,7 @@ unsigned long Download::fadler32(FILE *const file)
return adler;
}
-unsigned long Download::adlerBuffer(char *const buffer, int size)
+unsigned long Download::adlerBuffer(const char *const buffer, int size)
{
unsigned long adler = adler32(0L, Z_NULL, 0);
return adler32(static_cast<uInt>(adler),