From c8e56504d993b07cb173574678961596037ae18c Mon Sep 17 00:00:00 2001 From: John Maddock Date: Wed, 27 Jan 2010 13:17:51 +0000 Subject: [PATCH] Suppress a few warnings. [SVN r59275] --- include/boost/regex/v4/basic_regex_creator.hpp | 2 +- include/boost/regex/v4/match_results.hpp | 2 +- include/boost/regex/v4/regex_format.hpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/boost/regex/v4/basic_regex_creator.hpp b/include/boost/regex/v4/basic_regex_creator.hpp index ee207d08..0909a836 100644 --- a/include/boost/regex/v4/basic_regex_creator.hpp +++ b/include/boost/regex/v4/basic_regex_creator.hpp @@ -804,7 +804,7 @@ void basic_regex_creator::fixup_recursions(re_syntax_base* state) { bool ok = false; re_syntax_base* p = base; - int id = static_cast(state)->alt.i; + std::ptrdiff_t id = static_cast(state)->alt.i; if(id > 10000) id = m_pdata->get_id(id); while(p) diff --git a/include/boost/regex/v4/match_results.hpp b/include/boost/regex/v4/match_results.hpp index cd6b9eb5..514dbad7 100644 --- a/include/boost/regex/v4/match_results.hpp +++ b/include/boost/regex/v4/match_results.hpp @@ -457,7 +457,7 @@ public: void BOOST_REGEX_CALL set_second(BidiIterator i, size_type pos, bool m = true, bool escape_k = false) { if(pos) - m_last_closed_paren = pos; + m_last_closed_paren = static_cast(pos); pos += 2; BOOST_ASSERT(m_subs.size() > pos); m_subs[pos].second = i; diff --git a/include/boost/regex/v4/regex_format.hpp b/include/boost/regex/v4/regex_format.hpp index 0ca9baa7..51fc62ae 100644 --- a/include/boost/regex/v4/regex_format.hpp +++ b/include/boost/regex/v4/regex_format.hpp @@ -334,7 +334,7 @@ void basic_regex_formatter::format m_position = --base; } } - put((this->m_results)[this->m_results.size() > 1 ? this->m_results.size() - 1 : 1]); + put((this->m_results)[this->m_results.size() > 1 ? static_cast(this->m_results.size() - 1) : 1]); break; case '{': have_brace = true; @@ -384,7 +384,7 @@ bool basic_regex_formatter::handle if(have_brace && (*m_position == '^')) ++m_position; - int max_len = m_end - m_position; + std::ptrdiff_t max_len = m_end - m_position; if((max_len >= 5) && std::equal(m_position, m_position + 5, MATCH)) { @@ -447,7 +447,7 @@ bool basic_regex_formatter::handle return false; } } - put((this->m_results)[this->m_results.size() > 1 ? this->m_results.size() - 1 : 1]); + put((this->m_results)[this->m_results.size() > 1 ? static_cast(this->m_results.size() - 1) : 1]); return true; } if((max_len >= 20) && std::equal(m_position, m_position + 20, LAST_SUBMATCH_RESULT))