~vanvugt/+junk/mediatomb

« back to all changes in this revision

Viewing changes to debian/patches/const_char_conversion.patch

  • Committer: Bazaar Package Importer
  • Author(s): Lionel Le Folgoc
  • Date: 2010-02-22 20:16:31 UTC
  • mfrom: (4.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100222201631-fgwswo4s4ogdr8x8
Tags: 0.12.0~svn2018-6ubuntu1
* Merge from debian unstable, Ubuntu remaining changes:
  - Add OR depends on abrowser.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Fix (const char *) conversion to (char *).
 
2
==========================================================================
 
3
--- a/src/tools.cc
 
4
+++ b/src/tools.cc
 
5
@@ -297,14 +297,14 @@
 
6
 
 
7
 String hex_decode_string(String encoded)
 
8
 {
 
9
-    char *ptr = encoded.c_str();
 
10
+    char *ptr = const_cast<char *>(encoded.c_str());
 
11
     int len = encoded.length();
 
12
     
 
13
     Ref<StringBuffer> buf(new StringBuffer(len / 2));
 
14
     for (int i = 0; i < len; i += 2)
 
15
     {
 
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]);
 
20
         int hi, lo;
 
21
         
 
22
         if (chi)
 
23
@@ -381,7 +381,7 @@
 
24
 
 
25
 String url_unescape(String str)
 
26
 {
 
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));
 
31
 
 
32
@@ -399,13 +399,13 @@
 
33
 
 
34
             char *pos;
 
35
 
 
36
-            pos = strchr(hex, chi);
 
37
+            pos = strchr(const_cast<char *>(hex), chi);
 
38
             if (!pos)
 
39
                 hi = 0;
 
40
             else
 
41
                 hi = pos - hex;
 
42
 
 
43
-            pos = strchr(hex, clo);
 
44
+            pos = strchr(const_cast<char *>(hex), clo);
 
45
             if (!pos)
 
46
                 lo = 0;
 
47
             else