Ticket #2305: unit_test.patch

File unit_test.patch, 3.7 KB (added by alexott@…, 14 years ago)

patch to fix warnings

  • boost/test/unit_test_suite_impl.hpp

     
    228228struct user_tc_method_invoker {
    229229    typedef void (UserTestCase::*test_method )();
    230230
    231     user_tc_method_invoker( shared_ptr<InstanceType> inst, test_method test_method )
    232     : m_inst( inst ), m_test_method( test_method ) {}
     231    user_tc_method_invoker( shared_ptr<InstanceType> inst, test_method test_method_ )
     232    : m_inst( inst ), m_test_method( test_method_ ) {}
    233233
    234234    void operator()() { ((*m_inst).*m_test_method)(); }
    235235
  • boost/test/utils/basic_cstring/basic_cstring.hpp

     
    511511
    512512template<typename CharT>
    513513inline typename basic_cstring<CharT>::size_type
    514 basic_cstring<CharT>::find( basic_cstring<CharT> substr ) const
     514basic_cstring<CharT>::find( basic_cstring<CharT> substr_ ) const
    515515{
    516     if( substr.is_empty() || substr.size() > size() )
     516    if( substr_.is_empty() || substr_.size() > size() )
    517517        return (size_type)npos;
    518518
    519519    const_iterator it   = begin();
    520     const_iterator last = end() - substr.size() + 1;
     520    const_iterator last = end() - substr_.size() + 1;
    521521
    522522    while( it != last ) {
    523         if( traits_type::compare( it, substr.begin(), substr.size() ) == 0 )
     523        if( traits_type::compare( it, substr_.begin(), substr_.size() ) == 0 )
    524524            break;
    525525
    526526        ++it;
     
    533533
    534534template<typename CharT>
    535535inline typename basic_cstring<CharT>::size_type
    536 basic_cstring<CharT>::rfind( basic_cstring<CharT> substr ) const
     536basic_cstring<CharT>::rfind( basic_cstring<CharT> substr_ ) const
    537537{
    538     if( substr.is_empty() || substr.size() > size() )
     538    if( substr_.is_empty() || substr_.size() > size() )
    539539        return (size_type)npos;
    540540
    541     const_iterator it   = end() - substr.size();
     541    const_iterator it   = end() - substr_.size();
    542542    const_iterator last = begin()-1;
    543543
    544544    while( it != last ) {
    545         if( traits_type::compare( it, substr.begin(), substr.size() ) == 0 )
     545        if( traits_type::compare( it, substr_.begin(), substr_.size() ) == 0 )
    546546            break;
    547547
    548548        --it;
  • boost/progress.hpp

     
    7777class progress_display : private noncopyable
    7878{
    7979 public:
    80   explicit progress_display( unsigned long expected_count,
     80  explicit progress_display( unsigned long expected_count_,
    8181                             std::ostream & os = std::cout,
    8282                             const std::string & s1 = "\n", //leading strings
    8383                             const std::string & s2 = "",
    8484                             const std::string & s3 = "" )
    8585   // os is hint; implementation may ignore, particularly in embedded systems
    86    : m_os(os), m_s1(s1), m_s2(s2), m_s3(s3) { restart(expected_count); }
     86   : m_os(os), m_s1(s1), m_s2(s2), m_s3(s3) { restart(expected_count_); }
    8787
    88   void           restart( unsigned long expected_count )
     88  void           restart( unsigned long expected_count_ )
    8989  //  Effects: display appropriate scale
    9090  //  Postconditions: count()==0, expected_count()==expected_count
    9191  {
    9292    _count = _next_tic_count = _tic = 0;
    93     _expected_count = expected_count;
     93    _expected_count = expected_count_;
    9494
    9595    m_os << m_s1 << "0%   10   20   30   40   50   60   70   80   90   100%\n"
    9696         << m_s2 << "|----|----|----|----|----|----|----|----|----|----|"