summaryrefslogtreecommitdiff
path: root/libstdc++-v3/include/bits/basic_string.tcc
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-25 15:45:13 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-25 15:45:13 +0000
commit01b9372d03cb033f5e1ab866d94242031c11c358 (patch)
treed5b3c279153b532f4dde8653e2d3be4b297e66e4 /libstdc++-v3/include/bits/basic_string.tcc
parentafd3c60a7551a6f025874ccc543b1b6144f9272e (diff)
downloadgcc-01b9372d03cb033f5e1ab866d94242031c11c358.tar.gz
2004-04-25 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/15002 (continued again) * include/bits/istream.tcc (getline(basic_istream<>&, basic_string<>&, _CharT)): Use a temporary buffer, thus avoiding reallocation for common case. * include/bits/basic_string.tcc (_S_construct(_InIterator, _InIterator, const _Alloc&, input_iterator_tag)): Tweak size of temporary buffer to a power of two. * testsuite/27_io/basic_istream/getline/char/4.cc: Add comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81163 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/include/bits/basic_string.tcc')
-rw-r--r--libstdc++-v3/include/bits/basic_string.tcc2
1 files changed, 1 insertions, 1 deletions
diff --git a/libstdc++-v3/include/bits/basic_string.tcc b/libstdc++-v3/include/bits/basic_string.tcc
index 8f60abef526..7034778e9df 100644
--- a/libstdc++-v3/include/bits/basic_string.tcc
+++ b/libstdc++-v3/include/bits/basic_string.tcc
@@ -91,7 +91,7 @@ namespace std
if (__beg == __end && __a == _Alloc())
return _S_empty_rep()._M_refdata();
// Avoid reallocation for common case.
- _CharT __buf[100];
+ _CharT __buf[128];
size_type __len = 0;
while (__beg != __end && __len < sizeof(__buf) / sizeof(_CharT))
{