basic_string.tcc (_M_replace_aux): Constify __n1 and __off1.

2003-07-02  Paolo Carlini  <pcarlini@unitus.it>

	* include/bits/basic_string.tcc (_M_replace_aux): Constify
	__n1 and __off1.

From-SVN: r68849
This commit is contained in:
Paolo Carlini 2003-07-02 21:36:40 +02:00 committed by Paolo Carlini
parent f23b9d529c
commit 41ba4c4632
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
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

View File

@ -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);