1
Fix (const char *) conversion to (char *).
2
==========================================================================
7
String hex_decode_string(String encoded)
9
- char *ptr = encoded.c_str();
10
+ char *ptr = const_cast<char *>(encoded.c_str());
11
int len = encoded.length();
13
Ref<StringBuffer> buf(new StringBuffer(len / 2));
14
for (int i = 0; i < len; i += 2)
16
- char *chi = strchr(HEX_CHARS, ptr[i]);
17
- char *clo = strchr(HEX_CHARS, ptr[i + 1]);
18
+ char *chi = strchr(const_cast<char *>(HEX_CHARS), ptr[i]);
19
+ char *clo = strchr(const_cast<char *>(HEX_CHARS), ptr[i + 1]);
25
String url_unescape(String str)
27
- char *data = str.c_str();
28
+ char *data = const_cast<char *>(str.c_str());
29
int len = str.length();
30
Ref<StringBuffer> buf(new StringBuffer(len));
36
- pos = strchr(hex, chi);
37
+ pos = strchr(const_cast<char *>(hex), chi);
43
- pos = strchr(hex, clo);
44
+ pos = strchr(const_cast<char *>(hex), clo);