summaryrefslogtreecommitdiffstats
path: root/libjava/java
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-25 08:45:04 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2004-10-25 08:45:04 +0000
commitbb3d96d249809428bf701cec8ff1b7c155b2c97f (patch)
tree53f134c47b30d8ff6221eeacd91087abc68323a9 /libjava/java
parent3ade79a060371ee8a25766849b56c579bf654def (diff)
downloadppe42-gcc-bb3d96d249809428bf701cec8ff1b7c155b2c97f.tar.gz
ppe42-gcc-bb3d96d249809428bf701cec8ff1b7c155b2c97f.zip
2004-10-25 Paolo Carlini <pcarlini@suse.de>
* include/bits/basic_string.h (_Rep::_M_is_safe, _M_check_length, _M_move, _M_copy, _M_assign): New, use througout. (operator+=(_CharT)): Define in terms of push_back. (append(const basic_string&)): Define here, inline, and simplify, don't use the full _M_replace_safe. (append(size_type, _CharT)): Likewise, don't use _M_replace_aux. (push_back): Likewise. (assign(const basic_string&)): Define here, inline. * include/bits/basic_string.tcc (append(const _CharT* s, size_type): Fix: when s points inside the _Rep, upon reallocation (reserve) we were copying from deallocated memory. (append(const basic_string&, size_type, size_type)): Simplify, don't use _M_replace_safe. (replace(size_type, size_type, const _CharT*, size_type)): Slightly tweak. (reserve): Likewise. * testsuite/21_strings/basic_string/append/char/2.cc: New. * testsuite/21_strings/basic_string/append/char/3.cc: Likewise. * testsuite/21_strings/basic_string/append/wchar_t/2.cc: Likewise. * testsuite/21_strings/basic_string/append/wchar_t/3.cc: Likewise. * testsuite/21_strings/basic_string/assign/char/3.cc: Remove junk. * testsuite/21_strings/basic_string/assign/wchar_t/3.cc: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@89526 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava/java')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud