]> git.lyx.org Git - lyx.git/blobdiff - boost/boost/format/format_implementation.hpp
typos
[lyx.git] / boost / boost / format / format_implementation.hpp
index ccaa346c2f14cde92f177560b5c3b219fbdf5df1..3dd68e78d22c781ac0a68ec4e910f7804ac67501 100644 (file)
@@ -135,7 +135,7 @@ namespace boost {
 
         for(unsigned long i=0; i<items_.size(); ++i) {
             // clear converted strings only if the corresponding argument is not  bound :
-            if( bound_.size()==0 || !bound_[ items_[i].argN_ ] )
+            if( bound_.size()==0 || items_[i].argN_<0 || !bound_[ items_[i].argN_ ] )
                 items_[i].res_.resize(0);
         }
         cur_arg_=0; dumped_=false;
@@ -190,9 +190,9 @@ namespace boost {
             res += item.res_;
             if( item.argN_ == format_item_t::argN_tabulation) { 
                 BOOST_ASSERT( item.pad_scheme_ & format_item_t::tabulation);
-                std::streamsize  n = item.fmtstate_.width_ - res.size();
-                if( n > 0 )
-                    res.append( n, item.fmtstate_.fill_ );
+                if( static_cast<size_type>(item.fmtstate_.width_) > res.size() )
+                    res.append( static_cast<size_type>(item.fmtstate_.width_) - res.size(),
+                                        item.fmtstate_.fill_ );
             }
             res += item.appendix_;
         }
@@ -200,19 +200,20 @@ namespace boost {
         return res;
     }
     template< class Ch, class Tr, class Alloc>
-    typename basic_format<Ch, Tr, Alloc>::size_type  basic_format<Ch,Tr, Alloc>:: 
+    typename std::basic_string<Ch, Tr, Alloc>::size_type  basic_format<Ch,Tr, Alloc>:: 
     size () const {
         BOOST_USING_STD_MAX();
-        std::streamsize sz = prefix_.size();
+        size_type sz = prefix_.size();
         unsigned long i;
         for(i=0; i < items_.size(); ++i) {
             const format_item_t& item = items_[i];
             sz += item.res_.size();
             if( item.argN_ == format_item_t::argN_tabulation)
-                sz = max BOOST_PREVENT_MACRO_SUBSTITUTION (sz, item.fmtstate_.width_);
-            sz +=  + item.appendix_.size();
+                sz = max BOOST_PREVENT_MACRO_SUBSTITUTION (sz,
+                                        static_cast<size_type>(item.fmtstate_.width_) );
+            sz += item.appendix_.size();
         }
-        return static_cast<typename string_type::size_type> (sz);
+        return sz;
     }
 
 namespace io {