mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-12-02 16:23:56 +08:00
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:
parent
f23b9d529c
commit
41ba4c4632
@ -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
|
||||
|
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user