Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r82662 - trunk/boost/regex/v4
From: john_at_[hidden]
Date: 2013-01-28 14:19:57


Author: johnmaddock
Date: 2013-01-28 14:19:56 EST (Mon, 28 Jan 2013)
New Revision: 82662
URL: http://svn.boost.org/trac/boost/changeset/82662

Log:
Add some casts to suppress GCC warnings.
Text files modified:
   trunk/boost/regex/v4/regex_traits_defaults.hpp | 34 +++++++++++++++++-----------------
   1 files changed, 17 insertions(+), 17 deletions(-)

Modified: trunk/boost/regex/v4/regex_traits_defaults.hpp
==============================================================================
--- trunk/boost/regex/v4/regex_traits_defaults.hpp (original)
+++ trunk/boost/regex/v4/regex_traits_defaults.hpp 2013-01-28 14:19:56 EST (Mon, 28 Jan 2013)
@@ -3,12 +3,12 @@
  * Copyright (c) 2004
  * John Maddock
  *
- * Use, modification and distribution are subject to the
- * Boost Software License, Version 1.0. (See accompanying file
+ * Use, modification and distribution are subject to the
+ * Boost Software License, Version 1.0. (See accompanying file
  * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  *
  */
-
+
  /*
   * LOCATION: see http://www.boost.org for most recent version.
   * FILE regex_traits_defaults.hpp
@@ -85,7 +85,7 @@
    return false;
 }
 #if !defined(__hpux) && !defined(__WINSCW__) // can't use WCHAR_MAX/MIN in pp-directives
-#ifdef _MSC_VER
+#ifdef _MSC_VER
 template<>
 inline bool is_combining<wchar_t>(wchar_t c)
 {
@@ -115,11 +115,11 @@
 inline bool is_separator(charT c)
 {
    return BOOST_REGEX_MAKE_BOOL(
- (c == static_cast<charT>('\n'))
- || (c == static_cast<charT>('\r'))
- || (c == static_cast<charT>('\f'))
- || (static_cast<boost::uint16_t>(c) == 0x2028u)
- || (static_cast<boost::uint16_t>(c) == 0x2029u)
+ (c == static_cast<charT>('\n'))
+ || (c == static_cast<charT>('\r'))
+ || (c == static_cast<charT>('\f'))
+ || (static_cast<boost::uint16_t>(c) == 0x2028u)
+ || (static_cast<boost::uint16_t>(c) == 0x2029u)
       || (static_cast<boost::uint16_t>(c) == 0x85u));
 }
 template <>
@@ -177,7 +177,7 @@
       'x', 'd', 'i', 'g', 'i', 't',
    };
 
- static const character_pointer_range<charT> ranges[21] =
+ static const character_pointer_range<charT> ranges[21] =
    {
       {data+0, data+5,}, // alnum
       {data+5, data+10,}, // alpha
@@ -203,7 +203,7 @@
    };
    static const character_pointer_range<charT>* ranges_begin = ranges;
    static const character_pointer_range<charT>* ranges_end = ranges + (sizeof(ranges)/sizeof(ranges[0]));
-
+
    character_pointer_range<charT> t = { p1, p2, };
    const character_pointer_range<charT>* p = std::lower_bound(ranges_begin, ranges_end, t);
    if((p != ranges_end) && (t == *p))
@@ -324,15 +324,15 @@
 # pragma warning(push)
 # pragma warning(disable:4309 4245)
 #endif
- static const charT e1[] = { '(', '?', '>', '\x0D', '\x0A', '?',
- '|', '[', '\x0A', '\x0B', '\x0C', '\x85', '\\', 'x', '{', '2', '0', '2', '8', '}',
+ static const charT e1[] = { '(', '?', '>', '\x0D', '\x0A', '?',
+ '|', '[', '\x0A', '\x0B', '\x0C', static_cast<unsigned char>('\x85'), '\\', 'x', '{', '2', '0', '2', '8', '}',
                 '\\', 'x', '{', '2', '0', '2', '9', '}', ']', ')', '\0' };
- static const charT e2[] = { '(', '?', '>', '\x0D', '\x0A', '?',
- '|', '[', '\x0A', '\x0B', '\x0C', '\x85', ']', ')', '\0' };
+ static const charT e2[] = { '(', '?', '>', '\x0D', '\x0A', '?',
+ '|', '[', '\x0A', '\x0B', '\x0C', static_cast<unsigned char>('\x85'), ']', ')', '\0' };
 
    charT c = static_cast<charT>(0x2029u);
    bool b = (static_cast<unsigned>(c) == 0x2029u);
-
+
    return (b ? e1 : e2);
 #ifdef BOOST_MSVC
 # pragma warning(pop)
@@ -346,7 +346,7 @@
 # pragma warning(push)
 # pragma warning(disable:4309)
 #endif
- static const char e2[] = { '(', '?', '>', '\x0D', '\x0A', '?',
+ static const char e2[] = { '(', '?', '>', '\x0D', '\x0A', '?',
       '|', '[', '\x0A', '\x0B', '\x0C', '\x85', ']', ')', '\0' };
    return e2;
 #ifdef BOOST_MSVC


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk