forked from boostorg/regex
Ensure code is -W4 clean on VC++.
Remove unneeded parameters from one function. Change casts so they actually work correctly on Win64 platforms. [SVN r31284]
This commit is contained in:
@ -1342,6 +1342,10 @@ bool valid_value(charT c, int v)
|
|||||||
template <class charT, class traits>
|
template <class charT, class traits>
|
||||||
charT basic_regex_parser<charT, traits>::unescape_character()
|
charT basic_regex_parser<charT, traits>::unescape_character()
|
||||||
{
|
{
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
#pragma warning(push)
|
||||||
|
#pragma warning(disable:4127)
|
||||||
|
#endif
|
||||||
charT result(0);
|
charT result(0);
|
||||||
if(m_position == m_end)
|
if(m_position == m_end)
|
||||||
{
|
{
|
||||||
@ -1494,6 +1498,9 @@ charT basic_regex_parser<charT, traits>::unescape_character()
|
|||||||
}
|
}
|
||||||
++m_position;
|
++m_position;
|
||||||
return result;
|
return result;
|
||||||
|
#ifdef BOOST_MSVC
|
||||||
|
#pragma warning(pop)
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class charT, class traits>
|
template <class charT, class traits>
|
||||||
|
@ -167,10 +167,7 @@ template BOOST_REGEX_DECL void BOOST_REGEX_CALL
|
|||||||
|
|
||||||
namespace re_detail{
|
namespace re_detail{
|
||||||
template BOOST_REGEX_DECL void perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >::construct_init(
|
template BOOST_REGEX_DECL void perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >::construct_init(
|
||||||
BOOST_REGEX_CHAR_T const * first, BOOST_REGEX_CHAR_T const * end,
|
const basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >& e, match_flag_type f);
|
||||||
match_results<BOOST_REGEX_CHAR_T const *>& what,
|
|
||||||
const basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >& e,
|
|
||||||
match_flag_type f);
|
|
||||||
template BOOST_REGEX_DECL bool perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >::match();
|
template BOOST_REGEX_DECL bool perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >::match();
|
||||||
template BOOST_REGEX_DECL bool perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >::find();
|
template BOOST_REGEX_DECL bool perl_matcher<BOOST_REGEX_CHAR_T const *, match_results< const BOOST_REGEX_CHAR_T* >::allocator_type BOOST_REGEX_TRAITS_T >::find();
|
||||||
} // namespace
|
} // namespace
|
||||||
@ -186,10 +183,7 @@ template BOOST_REGEX_DECL void BOOST_REGEX_CALL
|
|||||||
|
|
||||||
namespace re_detail{
|
namespace re_detail{
|
||||||
template BOOST_REGEX_DECL void perl_matcher<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >::construct_init(
|
template BOOST_REGEX_DECL void perl_matcher<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >::construct_init(
|
||||||
std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator first, std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator end,
|
const basic_regex<BOOST_REGEX_CHAR_T>& e, match_flag_type f);
|
||||||
match_results<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>& what,
|
|
||||||
const basic_regex<BOOST_REGEX_CHAR_T>& e,
|
|
||||||
match_flag_type f);
|
|
||||||
template BOOST_REGEX_DECL bool perl_matcher<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >::match();
|
template BOOST_REGEX_DECL bool perl_matcher<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >::match();
|
||||||
template BOOST_REGEX_DECL bool perl_matcher<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >::find();
|
template BOOST_REGEX_DECL bool perl_matcher<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator, match_results< std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator >::allocator_type, boost::regex_traits<BOOST_REGEX_CHAR_T > >::find();
|
||||||
} // namespace
|
} // namespace
|
||||||
|
@ -338,10 +338,7 @@ public:
|
|||||||
{ m_match_flags &= ~f; }
|
{ m_match_flags &= ~f; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void construct_init(BidiIterator first, BidiIterator end,
|
void construct_init(const basic_regex<char_type, traits>& e, match_flag_type f);
|
||||||
match_results<BidiIterator, Allocator>& what,
|
|
||||||
const basic_regex<char_type, traits>& e,
|
|
||||||
match_flag_type f);
|
|
||||||
bool find_imp();
|
bool find_imp();
|
||||||
bool match_imp();
|
bool match_imp();
|
||||||
#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
|
#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD
|
||||||
|
@ -41,14 +41,11 @@ perl_matcher<BidiIterator, Allocator, traits>::perl_matcher(BidiIterator first,
|
|||||||
position(first), backstop(b), re(e), traits_inst(e.get_traits()),
|
position(first), backstop(b), re(e), traits_inst(e.get_traits()),
|
||||||
m_independent(false), next_count(&rep_obj), rep_obj(&next_count)
|
m_independent(false), next_count(&rep_obj), rep_obj(&next_count)
|
||||||
{
|
{
|
||||||
construct_init(first, last, what, e, f);
|
construct_init(e, f);
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class BidiIterator, class Allocator, class traits>
|
template <class BidiIterator, class Allocator, class traits>
|
||||||
void perl_matcher<BidiIterator, Allocator, traits>::construct_init(BidiIterator first, BidiIterator end,
|
void perl_matcher<BidiIterator, Allocator, traits>::construct_init(const basic_regex<char_type, traits>& e, match_flag_type f)
|
||||||
match_results<BidiIterator, Allocator>& what,
|
|
||||||
const basic_regex<char_type, traits>& e,
|
|
||||||
match_flag_type f)
|
|
||||||
{
|
{
|
||||||
typedef typename regex_iterator_traits<BidiIterator>::iterator_category category;
|
typedef typename regex_iterator_traits<BidiIterator>::iterator_category category;
|
||||||
|
|
||||||
|
@ -510,7 +510,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_char_repeat()
|
|||||||
if(::boost::is_random_access_iterator<BidiIterator>::value)
|
if(::boost::is_random_access_iterator<BidiIterator>::value)
|
||||||
{
|
{
|
||||||
BidiIterator end = position;
|
BidiIterator end = position;
|
||||||
std::advance(end, (std::min)((unsigned)::boost::re_detail::distance(position, last), desired));
|
std::advance(end, (std::min)((std::size_t)::boost::re_detail::distance(position, last), desired));
|
||||||
BidiIterator origin(position);
|
BidiIterator origin(position);
|
||||||
while((position != end) && (traits_inst.translate(*position, icase) == what))
|
while((position != end) && (traits_inst.translate(*position, icase) == what))
|
||||||
{
|
{
|
||||||
@ -599,7 +599,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_set_repeat()
|
|||||||
if(::boost::is_random_access_iterator<BidiIterator>::value)
|
if(::boost::is_random_access_iterator<BidiIterator>::value)
|
||||||
{
|
{
|
||||||
BidiIterator end = position;
|
BidiIterator end = position;
|
||||||
std::advance(end, (std::min)((unsigned)::boost::re_detail::distance(position, last), desired));
|
std::advance(end, (std::min)((std::size_t)::boost::re_detail::distance(position, last), desired));
|
||||||
BidiIterator origin(position);
|
BidiIterator origin(position);
|
||||||
while((position != end) && map[static_cast<unsigned char>(traits_inst.translate(*position, icase))])
|
while((position != end) && map[static_cast<unsigned char>(traits_inst.translate(*position, icase))])
|
||||||
{
|
{
|
||||||
@ -689,7 +689,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_long_set_repeat()
|
|||||||
if(::boost::is_random_access_iterator<BidiIterator>::value)
|
if(::boost::is_random_access_iterator<BidiIterator>::value)
|
||||||
{
|
{
|
||||||
BidiIterator end = position;
|
BidiIterator end = position;
|
||||||
std::advance(end, (std::min)((unsigned)::boost::re_detail::distance(position, last), desired));
|
std::advance(end, (std::min)((std::size_t)::boost::re_detail::distance(position, last), desired));
|
||||||
BidiIterator origin(position);
|
BidiIterator origin(position);
|
||||||
while((position != end) && (position != re_is_set_member(position, last, set, re.get_data(), icase)))
|
while((position != end) && (position != re_is_set_member(position, last, set, re.get_data(), icase)))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user