Commit 41ba4c46 by Paolo Carlini Committed by Paolo Carlini

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
parent f23b9d52
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.
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment