From ca6500fcd0812d2b2da8a62d52b3613b4cbab12a Mon Sep 17 00:00:00 2001 From: Alexander Kabaev Date: Sun, 1 Sep 2002 20:39:13 +0000 Subject: Gcc 3.2.1-prerelease libf2c bits from the FSF anoncvs repo gcc-3_2-branch on 1-Sep-2002 00:00:01 EDT. --- contrib/libstdc++/include/bits/basic_string.tcc | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'contrib/libstdc++/include/bits/basic_string.tcc') diff --git a/contrib/libstdc++/include/bits/basic_string.tcc b/contrib/libstdc++/include/bits/basic_string.tcc index 35a2f11f7e761..6d646ad2a1055 100644 --- a/contrib/libstdc++/include/bits/basic_string.tcc +++ b/contrib/libstdc++/include/bits/basic_string.tcc @@ -140,7 +140,7 @@ namespace std size_type __dnew = static_cast(distance(__beg, __end)); // NB: Not required, but considered best practice. - if (__builtin_expect(__beg == _InIter(0), 0)) + if (__builtin_expect(__beg == _InIter(), 0)) __throw_logic_error("attempt to create string with null pointer"); if (__beg == __end && __a == _Alloc()) @@ -498,13 +498,10 @@ namespace std // else nothing (in particular, avoid calling _M_mutate() unnecessarily.) } - // This is the general replace helper, which gets instantiated both - // for input-iterators and forward-iterators. It buffers internally and - // then calls _M_replace_safe. For input-iterators this is almost the - // best we can do, but for forward-iterators many optimizations could be - // conceived: f.i., when source and destination ranges do not overlap - // buffering is not really needed. In order to easily implement them, it - // could become useful to add an _M_replace(forward_iterator_tag) + + // This is the general replace helper, which currently gets instantiated both + // for input iterators and reverse iterators. It buffers internally and then + // calls _M_replace_safe. template template basic_string<_CharT, _Traits, _Alloc>& @@ -518,10 +515,8 @@ namespace std } // This is a special replace helper, which does not buffer internally - // and can be used in the "safe" situations involving forward-iterators, + // and can be used in "safe" situations involving forward iterators, // i.e., when source and destination ranges are known to not overlap. - // Presently, is called by _M_replace, by the various append and by - // the assigns. template template basic_string<_CharT, _Traits, _Alloc>& -- cgit v1.3