4141#include  < boost/regex/pending/object_cache.hpp> 
4242#endif 
4343
44- #include  < istream> 
45- #include  < ios> 
4644#include  < climits> 
45+ #include  < ios> 
46+ #include  < istream> 
4747
4848#ifdef  BOOST_MSVC
4949#pragma  warning(push)
@@ -89,9 +89,9 @@ class parser_buf : public ::std::basic_streambuf<charT, traits>
8989   parser_buf () : base_type() { setbuf (0 , 0 ); }
9090   const  charT* getnext () { return  this ->gptr (); }
9191protected: 
92-    std::basic_streambuf<charT, traits>* setbuf (char_type* s, streamsize n);
93-    typename  parser_buf<charT, traits>::pos_type seekpos (pos_type sp, ::std::ios_base::openmode which);
94-    typename  parser_buf<charT, traits>::pos_type seekoff (off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which);
92+    std::basic_streambuf<charT, traits>* setbuf (char_type* s, streamsize n) BOOST_OVERRIDE ;
93+    typename  parser_buf<charT, traits>::pos_type seekpos (pos_type sp, ::std::ios_base::openmode which) BOOST_OVERRIDE ;
94+    typename  parser_buf<charT, traits>::pos_type seekoff (off_type off, ::std::ios_base::seekdir way, ::std::ios_base::openmode which) BOOST_OVERRIDE ;
9595private: 
9696   parser_buf& operator =(const  parser_buf&);
9797   parser_buf (const  parser_buf&);
@@ -225,7 +225,7 @@ std::locale cpp_regex_traits_base<charT>::imbue(const std::locale& l)
225225
226226// 
227227//  class cpp_regex_traits_char_layer:
228- //  implements methods that require specialisation  for narrow characters:
228+ //  implements methods that require specialization  for narrow characters:
229229// 
230230template  <class  charT >
231231class  cpp_regex_traits_char_layer  : public  cpp_regex_traits_base <charT>
@@ -281,7 +281,7 @@ void cpp_regex_traits_char_layer<charT>::init()
281281   typename  std::messages<charT>::catalog cat = reinterpret_cast <std::messages<char >::catalog>(-1 );
282282#endif 
283283   std::string cat_name (cpp_regex_traits<charT>::get_catalog_name ());
284-    if (cat_name.size ( ) && (this ->m_pmessages  != 0 ))
284+    if ((! cat_name.empty () ) && (this ->m_pmessages  != 0 ))
285285   {
286286      cat = this ->m_pmessages ->open (
287287         cat_name, 
@@ -352,7 +352,7 @@ typename cpp_regex_traits_char_layer<charT>::string_type
352352}
353353
354354// 
355- //  specialised  version for narrow characters:
355+ //  specialized  version for narrow characters:
356356// 
357357template  <>
358358class  BOOST_REGEX_DECL  cpp_regex_traits_char_layer<char > : public cpp_regex_traits_base<char >
@@ -566,7 +566,7 @@ typename cpp_regex_traits_implementation<charT>::string_type
566566#ifndef  BOOST_NO_EXCEPTIONS
567567   }catch (...){}
568568#endif 
569-    while (result.size ( ) && (charT (0 ) == *result.rbegin ()))
569+    while ((! result.empty () ) && (charT (0 ) == *result.rbegin ()))
570570      result.erase (result.size () - 1 );
571571   if (result.empty ())
572572   {
@@ -621,7 +621,7 @@ typename cpp_regex_traits_implementation<charT>::string_type
621621#else 
622622      // 
623623      //  some implementations (Dinkumware) append unnecessary trailing \0's:
624-       while (result.size ( ) && (charT (0 ) == *result.rbegin ()))
624+       while ((! result.empty () ) && (charT (0 ) == *result.rbegin ()))
625625         result.erase (result.size () - 1 );
626626#endif 
627627      // 
@@ -662,7 +662,7 @@ typename cpp_regex_traits_implementation<charT>::string_type
662662   cpp_regex_traits_implementation<charT>::lookup_collatename (const  charT* p1, const  charT* p2) const 
663663{
664664   typedef  typename  std::map<string_type, string_type>::const_iterator iter_type;
665-    if (m_custom_collate_names.size ())
665+    if (! m_custom_collate_names.empty ())
666666   {
667667      iter_type pos = m_custom_collate_names.find (string_type (p1, p2));
668668      if (pos != m_custom_collate_names.end ())
@@ -680,10 +680,10 @@ typename cpp_regex_traits_implementation<charT>::string_type
680680   name = lookup_default_collate_name (name);
681681#if  !defined(BOOST_NO_TEMPLATED_ITERATOR_CONSTRUCTORS)\
682682               && !BOOST_WORKAROUND (BOOST_BORLANDC, <= 0x0551 )
683-    if (name.size ())
683+    if (! name.empty ())
684684      return  string_type (name.begin (), name.end ());
685685#else 
686-    if (name.size ())
686+    if (! name.empty ())
687687   {
688688      string_type result;
689689      typedef  std::string::const_iterator iter;
@@ -709,7 +709,7 @@ void cpp_regex_traits_implementation<charT>::init()
709709   typename  std::messages<charT>::catalog cat = reinterpret_cast <std::messages<char >::catalog>(-1 );
710710#endif 
711711   std::string cat_name (cpp_regex_traits<charT>::get_catalog_name ());
712-    if (cat_name.size ( ) && (this ->m_pmessages  != 0 ))
712+    if ((! cat_name.empty () ) && (this ->m_pmessages  != 0 ))
713713   {
714714      cat = this ->m_pmessages ->open (
715715         cat_name, 
@@ -796,7 +796,7 @@ void cpp_regex_traits_implementation<charT>::init()
796796      for (unsigned  int  j = 0 ; j <= 13 ; ++j)
797797      {
798798         string_type s (this ->m_pmessages ->get (cat, 0 , j+300 , null_string));
799-          if (s. size ())
799+          if (!s. empty ())
800800            this ->m_custom_class_names [s] = masks[j];
801801      }
802802   }
@@ -864,7 +864,7 @@ typename cpp_regex_traits_implementation<charT>::char_class_type
864864      ::boost::BOOST_REGEX_DETAIL_NS::char_class_xdigit,
865865   };
866866#endif 
867-    if (m_custom_class_names.size ())
867+    if (! m_custom_class_names.empty ())
868868   {
869869      typedef  typename  std::map<std::basic_string<charT>, char_class_type>::const_iterator map_iter;
870870      map_iter pos = m_custom_class_names.find (string_type (p1, p2));
@@ -1129,7 +1129,6 @@ static_mutex& cpp_regex_traits<charT>::get_mutex_inst()
11291129}
11301130#endif 
11311131
1132- 
11331132} //  boost
11341133
11351134#ifdef  BOOST_MSVC
@@ -1150,5 +1149,3 @@ static_mutex& cpp_regex_traits<charT>::get_mutex_inst()
11501149#endif 
11511150
11521151#endif
1153- 
1154- 
0 commit comments