summaryrefslogtreecommitdiff
path: root/src/utils/base64.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-09-04 19:11:53 +0300
committerAndrei Karas <akaras@inbox.ru>2012-09-04 19:11:53 +0300
commit3a407bb6b73a186eafd99bcec570f88097c4b2e1 (patch)
treeea57a752c348ba0a883294855ad3c62c16e9749d /src/utils/base64.cpp
parent872fc368f7b253f26714fc47323064f270b62b40 (diff)
downloadManaVerse-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.gz
ManaVerse-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.bz2
ManaVerse-3a407bb6b73a186eafd99bcec570f88097c4b2e1.tar.xz
ManaVerse-3a407bb6b73a186eafd99bcec570f88097c4b2e1.zip
Add const to more classes.
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 094cd6227..52c6821fd 100644
--- a/src/utils/base64.cpp
+++ b/src/utils/base64.cpp
@@ -44,12 +44,12 @@ static char base64_table[] =
};
static char base64_pad = '=';
-unsigned char *php3_base64_encode(const unsigned char *string,
- int length, int *ret_length)
+unsigned char *php3_base64_encode(const unsigned char *const string,
+ int length, int *const ret_length)
{
const unsigned char *current = string;
int i = 0;
- unsigned char *result = static_cast<unsigned char *>(calloc(
+ unsigned char *const result = static_cast<unsigned char *>(calloc(
((length + 3 - length % 3) * 4 / 3 + 1) * sizeof(char), 1));
while (length > 2)
@@ -92,12 +92,12 @@ unsigned char *php3_base64_encode(const unsigned char *string,
}
/* as above, but backwards. :) */
-unsigned char *php3_base64_decode(const unsigned char *string,
- int length, int *ret_length)
+unsigned char *php3_base64_decode(const unsigned char *const string,
+ const int length, int *const ret_length)
{
const unsigned char *current = string;
int ch, i = 0, j = 0, k;
- char *chp;
+ const char *chp;
unsigned char *result = static_cast<unsigned char *>(
calloc(length + 1, 1));