From f353225685e27b579dda68b6b54dd107c72df62f Mon Sep 17 00:00:00 2001 From: John Maddock Date: Tue, 28 Jun 2005 15:31:33 +0000 Subject: [PATCH] Fix gcc warnings, and use the correct facet! [SVN r29831] --- include/boost/regex/v4/basic_regex_parser.hpp | 2 +- include/boost/regex/v4/cpp_regex_traits.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/regex/v4/basic_regex_parser.hpp b/include/boost/regex/v4/basic_regex_parser.hpp index e1987cd9..e0841ee9 100644 --- a/include/boost/regex/v4/basic_regex_parser.hpp +++ b/include/boost/regex/v4/basic_regex_parser.hpp @@ -1397,7 +1397,7 @@ charT basic_regex_parser::unescape_character() int i = this->m_traits.toi(m_position, m_end, 16); if((m_position == m_end) || (i < 0) - || ((std::numeric_limits::is_specialized) && (i > (std::numeric_limits::max)())) + || ((std::numeric_limits::is_specialized) && (charT(i) > (std::numeric_limits::max)())) || (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace)) { fail(regex_constants::error_badbrace, m_position - m_base); diff --git a/include/boost/regex/v4/cpp_regex_traits.hpp b/include/boost/regex/v4/cpp_regex_traits.hpp index 05681723..43278261 100644 --- a/include/boost/regex/v4/cpp_regex_traits.hpp +++ b/include/boost/regex/v4/cpp_regex_traits.hpp @@ -967,7 +967,7 @@ template int cpp_regex_traits::toi(const charT*& first, const charT* last, int radix)const { // we do NOT want to parse any thousands separators inside the stream: - last = std::find(first, last, BOOST_USE_FACET(std::numpunct, m_pimpl->m_is.getloc()).thousands_sep()); + last = std::find(first, last, BOOST_USE_FACET(std::numpunct, m_pimpl->m_is.getloc()).thousands_sep()); m_pimpl->m_sbuf.pubsetbuf(const_cast(static_cast(first)), static_cast(last-first)); m_pimpl->m_is.clear(); if(std::abs(radix) == 16) m_pimpl->m_is >> std::hex;