From bb9909b0fb7a3880c0812707ecdf3d42617fa1dd Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Sat, 24 Jan 2004 18:54:23 +0000 Subject: [PATCH] basic_string.tcc (operator+(const _CharT*, const basic_string&)): No need to go through the append taking two iterators. 2004-01-24 Paolo Carlini * include/bits/basic_string.tcc (operator+(const _CharT*, const basic_string&)): No need to go through the append taking two iterators. From-SVN: r76517 --- libstdc++-v3/ChangeLog | 6 ++++++ libstdc++-v3/include/bits/basic_string.tcc | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 1dafb09..e7fe103 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,5 +1,11 @@ 2004-01-24 Paolo Carlini + * 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 + * include/bits/basic_string.tcc (rfind(_CharT, size_type)): Revert last change to use std::min: machine language is worse. (find_last_of(const _CharT*, size_type, size_type)): Ditto. diff --git a/libstdc++-v3/include/bits/basic_string.tcc b/libstdc++-v3/include/bits/basic_string.tcc index 8606044..143c2ba 100644 --- a/libstdc++-v3/include/bits/basic_string.tcc +++ b/libstdc++-v3/include/bits/basic_string.tcc @@ -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; } -- 2.7.4