basic_string.tcc (operator+(const _CharT*, const basic_string&)): No need to go through the append taking two iterators.

2004-01-24  Paolo Carlini  <pcarlini@suse.de>

	* include/bits/basic_string.tcc (operator+(const _CharT*,
	const basic_string&)): No need to go through the append
	taking two iterators.

From-SVN: r76517
This commit is contained in:
Paolo Carlini 2004-01-24 18:54:23 +00:00 committed by Paolo Carlini
parent 04cc8aef67
commit bb9909b0fb
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2004-01-24 Paolo Carlini <pcarlini@suse.de>
* include/bits/basic_string.tcc (operator+(const _CharT*,
const basic_string&)): No need to go through the append
taking two iterators.
2004-01-24 Paolo Carlini <pcarlini@suse.de>
* include/bits/basic_string.tcc (rfind(_CharT, size_type)):

View File

@ -683,7 +683,7 @@ namespace std
const __size_type __len = _Traits::length(__lhs);
__string_type __str;
__str.reserve(__len + __rhs.size());
__str.append(__lhs, __lhs + __len);
__str.append(__lhs, __len);
__str.append(__rhs);
return __str;
}