Fix integer types and signedness:

Fixes https://svn.boost.org/trac10/ticket/13034
This commit is contained in:
jzmaddock
2017-07-31 18:51:25 +01:00
parent ab399c9159
commit d97bcfb5dd
3 changed files with 7 additions and 7 deletions

View File

@ -423,7 +423,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_slow()
#pragma warning(push)
#pragma warning(disable:4127)
#endif
unsigned count = 0;
std::size_t count = 0;
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
re_syntax_base* psingle = rep->next.p;
// match compulsary repeats first:
@ -497,7 +497,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_dot_repeat_fast()
#pragma warning(disable:4267)
#endif
bool greedy = (rep->greedy) && (!(m_match_flags & regex_constants::match_any) || m_independent);
std::size_t count = (std::min)(static_cast<std::size_t>(::boost::BOOST_REGEX_DETAIL_NS::distance(position, last)), static_cast<std::size_t>(greedy ? rep->max : rep->min));
std::size_t count = (std::min)(static_cast<std::size_t>(::boost::BOOST_REGEX_DETAIL_NS::distance(position, last)), greedy ? rep->max : rep->min);
if(rep->min > count)
{
position = last;
@ -657,7 +657,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_set_repeat()
#endif
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
const unsigned char* map = static_cast<const re_set*>(rep->next.p)->_map;
unsigned count = 0;
std::size_t count = 0;
//
// start by working out how much we can skip:
//
@ -753,7 +753,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat()
typedef typename traits::char_class_type char_class_type;
const re_repeat* rep = static_cast<const re_repeat*>(pstate);
const re_set_long<char_class_type>* set = static_cast<const re_set_long<char_class_type>*>(pstate->next.p);
unsigned count = 0;
std::size_t count = 0;
//
// start by working out how much we can skip:
//