summaryrefslogtreecommitdiff
path: root/external/boost/boost.jsonparser.warnings.patch.0
blob: 0cda6ea43e6819ce6bfb13f977f16005098267b7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
--- boost/property_tree/string_path.hpp
+++ boost/property_tree/string_path.hpp
@@ -88,14 +88,14 @@ namespace boost { namespace property_tree
         typedef typename String::value_type char_type;

         /// Create an empty path.
-        explicit string_path(char_type separator = char_type('.'));
+        explicit string_path(char_type separator_ = char_type('.'));
         /// Create a path by parsing the given string.
         /// @param value A sequence, possibly with separators, that describes
         ///              the path, e.g. "one.two.three".
         /// @param separator The separator used in parsing. Defaults to '.'.
         /// @param tr The translator used by this path to convert the individual
         ///           parts to keys.
-        string_path(const String &value, char_type separator = char_type('.'),
+        string_path(const String &value, char_type separator_ = char_type('.'),
                     Translator tr = Translator());
         /// Create a path by parsing the given string.
         /// @param value A zero-terminated array of values. Only use if zero-
@@ -106,7 +106,7 @@ namespace boost { namespace property_tree
         /// @param tr The translator used by this path to convert the individual
         ///           parts to keys.
         string_path(const char_type *value,
-                    char_type separator = char_type('.'),
+                    char_type separator_ = char_type('.'),
                     Translator tr = Translator());

         // Default copying doesn't do the right thing with the iterator
@@ -162,23 +162,23 @@ namespace boost { namespace property_tree
     };

     template <typename String, typename Translator> inline
-    string_path<String, Translator>::string_path(char_type separator)
-        : m_separator(separator), m_start(m_value.begin())
+    string_path<String, Translator>::string_path(char_type separator_)
+        : m_separator(separator_), m_start(m_value.begin())
     {}

     template <typename String, typename Translator> inline
     string_path<String, Translator>::string_path(const String &value,
-                                                 char_type separator,
+                                                 char_type separator_,
                                                  Translator tr)
-        : m_value(value), m_separator(separator),
+        : m_value(value), m_separator(separator_),
           m_tr(tr), m_start(m_value.begin())
     {}

     template <typename String, typename Translator> inline
     string_path<String, Translator>::string_path(const char_type *value,
-                                                 char_type separator,
+                                                 char_type separator_,
                                                  Translator tr)
-        : m_value(value), m_separator(separator),
+        : m_value(value), m_separator(separator_),
           m_tr(tr), m_start(m_value.begin())
     {}

--- boost/property_tree/detail/json_parser_write.hpp
+++ boost/property_tree/detail/json_parser_write.hpp
@@ -33,7 +33,7 @@
             // We escape everything outside ASCII, because this code can't
             // handle high unicode characters.
             if (*b == 0x20 || *b == 0x21 || (*b >= 0x23 && *b <= 0x2E) ||
-                (*b >= 0x30 && *b <= 0x5B) || (*b >= 0x5D && *b <= 0xFF))
+                (*b >= 0x30 && *b <= 0x5B) || (*b >= 0x5D && static_cast<typename std::basic_string<Ch>::traits_type::int_type>(*b) <= 0xFF))
                 result += *b;
             else if (*b == Ch('\b')) result += Ch('\\'), result += Ch('b');
             else if (*b == Ch('\f')) result += Ch('\\'), result += Ch('f');