summaryrefslogtreecommitdiff
path: root/src/utils/base64.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-07-17 23:26:59 +0300
committerAndrei Karas <akaras@inbox.ru>2012-07-17 23:26:59 +0300
commit7e0a97d2521b9ce57003176e82a0b5564aa003c2 (patch)
tree5b2cfe1afe09bea1063f783050c1fb549daee76d /src/utils/base64.cpp
parentf68cbf700a99f2f184715a5b8025bcb4b6525391 (diff)
downloadmanaverse-7e0a97d2521b9ce57003176e82a0b5564aa003c2.tar.gz
manaverse-7e0a97d2521b9ce57003176e82a0b5564aa003c2.tar.bz2
manaverse-7e0a97d2521b9ce57003176e82a0b5564aa003c2.tar.xz
manaverse-7e0a97d2521b9ce57003176e82a0b5564aa003c2.zip
Fix more code style and additional warnings.
Diffstat (limited to 'src/utils/base64.cpp')
-rw-r--r--src/utils/base64.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/utils/base64.cpp b/src/utils/base64.cpp
index cd7d59cdb..094cd6227 100644
--- a/src/utils/base64.cpp
+++ b/src/utils/base64.cpp
@@ -128,18 +128,18 @@ unsigned char *php3_base64_decode(const unsigned char *string,
switch (i % 4)
{
case 0:
- result[j] = ch << 2;
+ result[j] = static_cast<unsigned char>(ch << 2);
break;
case 1:
- result[j++] |= ch >> 4;
- result[j] = (ch & 0x0f) << 4;
+ result[j++] |= static_cast<unsigned char>(ch >> 4);
+ result[j] = static_cast<unsigned char>((ch & 0x0f) << 4);
break;
case 2:
- result[j++] |= ch >>2;
- result[j] = (ch & 0x03) << 6;
+ result[j++] |= static_cast<unsigned char>(ch >>2);
+ result[j] = static_cast<unsigned char>((ch & 0x03) << 6);
break;
case 3:
- result[j++] |= ch;
+ result[j++] |= static_cast<unsigned char>(ch);
break;
default:
break;