mirror of
https://github.com/boostorg/regex.git
synced 2025-07-16 13:52:17 +02:00
Fix gcc warnings, and use the correct facet!
[SVN r29831]
This commit is contained in:
@ -1397,7 +1397,7 @@ charT basic_regex_parser<charT, traits>::unescape_character()
|
||||
int i = this->m_traits.toi(m_position, m_end, 16);
|
||||
if((m_position == m_end)
|
||||
|| (i < 0)
|
||||
|| ((std::numeric_limits<charT>::is_specialized) && (i > (std::numeric_limits<charT>::max)()))
|
||||
|| ((std::numeric_limits<charT>::is_specialized) && (charT(i) > (std::numeric_limits<charT>::max)()))
|
||||
|| (this->m_traits.syntax_type(*m_position) != regex_constants::syntax_close_brace))
|
||||
{
|
||||
fail(regex_constants::error_badbrace, m_position - m_base);
|
||||
|
@ -967,7 +967,7 @@ template <class charT>
|
||||
int cpp_regex_traits<charT>::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<char>, m_pimpl->m_is.getloc()).thousands_sep());
|
||||
last = std::find(first, last, BOOST_USE_FACET(std::numpunct<charT>, m_pimpl->m_is.getloc()).thousands_sep());
|
||||
m_pimpl->m_sbuf.pubsetbuf(const_cast<charT*>(static_cast<const charT*>(first)), static_cast<std::streamsize>(last-first));
|
||||
m_pimpl->m_is.clear();
|
||||
if(std::abs(radix) == 16) m_pimpl->m_is >> std::hex;
|
||||
|
Reference in New Issue
Block a user