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:
John Maddock
2005-10-11 14:27:56 +00:00
parent 68ddd5edba
commit 4ea7e99509
5 changed files with 15 additions and 20 deletions

View File

@ -1342,6 +1342,10 @@ bool valid_value(charT c, int v)
template <class charT, class traits>
charT basic_regex_parser<charT, traits>::unescape_character()
{
#ifdef BOOST_MSVC
#pragma warning(push)
#pragma warning(disable:4127)
#endif
charT result(0);
if(m_position == m_end)
{
@ -1494,6 +1498,9 @@ charT basic_regex_parser<charT, traits>::unescape_character()
}
++m_position;
return result;
#ifdef BOOST_MSVC
#pragma warning(pop)
#endif
}
template <class charT, class traits>

View File

@ -167,10 +167,7 @@ template BOOST_REGEX_DECL void BOOST_REGEX_CALL
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(
BOOST_REGEX_CHAR_T const * first, BOOST_REGEX_CHAR_T const * end,
match_results<BOOST_REGEX_CHAR_T const *>& what,
const basic_regex<BOOST_REGEX_CHAR_T BOOST_REGEX_TRAITS_T >& e,
match_flag_type f);
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 >::find();
} // namespace
@ -186,10 +183,7 @@ template BOOST_REGEX_DECL void BOOST_REGEX_CALL
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(
std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator first, std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator end,
match_results<std::basic_string<BOOST_REGEX_CHAR_T>::const_iterator>& what,
const basic_regex<BOOST_REGEX_CHAR_T>& e,
match_flag_type f);
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 > >::find();
} // namespace

View File

@ -338,10 +338,7 @@ public:
{ m_match_flags &= ~f; }
private:
void construct_init(BidiIterator first, BidiIterator end,
match_results<BidiIterator, Allocator>& what,
const basic_regex<char_type, traits>& e,
match_flag_type f);
void construct_init(const basic_regex<char_type, traits>& e, match_flag_type f);
bool find_imp();
bool match_imp();
#ifdef BOOST_REGEX_HAS_MS_STACK_GUARD

View File

@ -41,14 +41,11 @@ perl_matcher<BidiIterator, Allocator, traits>::perl_matcher(BidiIterator first,
position(first), backstop(b), re(e), traits_inst(e.get_traits()),
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>
void perl_matcher<BidiIterator, Allocator, traits>::construct_init(BidiIterator first, BidiIterator end,
match_results<BidiIterator, Allocator>& what,
const basic_regex<char_type, traits>& e,
match_flag_type f)
void perl_matcher<BidiIterator, Allocator, traits>::construct_init(const basic_regex<char_type, traits>& e, match_flag_type f)
{
typedef typename regex_iterator_traits<BidiIterator>::iterator_category category;

View File

@ -510,7 +510,7 @@ bool perl_matcher<BidiIterator, Allocator, traits>::match_char_repeat()
if(::boost::is_random_access_iterator<BidiIterator>::value)
{
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);
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)
{
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);
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)
{
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);
while((position != end) && (position != re_is_set_member(position, last, set, re.get_data(), icase)))
{