basic_string.tcc (assign(const _CharT*, size_type)): Adjust bit missing from the previous commit.

2004-10-25  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.tcc (assign(const _CharT*, size_type)):
	Adjust bit missing from the previous commit.

From-SVN: r89532
This commit is contained in:
Paolo Carlini 2004-10-25 10:43:59 +00:00 committed by Paolo Carlini
parent 1e02510f05
commit d87bdb1330
2 changed files with 7 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2004-10-25 Paolo Carlini <pcarlini@suse.de>
* include/bits/basic_string.tcc (assign(const _CharT*, size_type)):
Adjust bit missing from the previous commit.
2004-10-25 Eric Botcazou <ebotcazou@libertysurf.fr>
PR other/18138

View File

@ -253,9 +253,9 @@ namespace std
// Work in-place.
const size_type __pos = __s - _M_data();
if (__pos >= __n)
traits_type::copy(_M_data(), __s, __n);
_M_copy(_M_data(), __s, __n);
else if (__pos)
traits_type::move(_M_data(), __s, __n);
_M_move(_M_data(), __s, __n);
_M_rep()->_M_set_length_and_sharable(__n);
return *this;
}