diff options
-rw-r--r-- | libstdc++-v3/ChangeLog | 5 | ||||
-rw-r--r-- | libstdc++-v3/include/bits/basic_string.tcc | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 848b850c..69f40c6 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,10 @@ 2003-07-02 Paolo Carlini <pcarlini@unitus.it> + * include/bits/basic_string.tcc (_M_replace_aux): Constify + __n1 and __off1. + +2003-07-02 Paolo Carlini <pcarlini@unitus.it> + * include/bits/stl_bvector.h: Fully qualify standard functions with std::, thus avoiding Koenig lookup. * include/bits/stl_construct.h: Likewise. diff --git a/libstdc++-v3/include/bits/basic_string.tcc b/libstdc++-v3/include/bits/basic_string.tcc index a9496c0..826e418 100644 --- a/libstdc++-v3/include/bits/basic_string.tcc +++ b/libstdc++-v3/include/bits/basic_string.tcc @@ -626,8 +626,8 @@ namespace std basic_string<_CharT, _Traits, _Alloc>:: _M_replace_aux(iterator __i1, iterator __i2, size_type __n2, _CharT __c) { - size_type __n1 = __i2 - __i1; - size_type __off1 = __i1 - _M_ibegin(); + const size_type __n1 = __i2 - __i1; + const size_type __off1 = __i1 - _M_ibegin(); if (max_size() - (this->size() - __n1) <= __n2) __throw_length_error("basic_string::replace"); _M_mutate (__off1, __n1, __n2); |