diff options
| author | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-08-18 15:42:05 +0000 |
|---|---|---|
| committer | paolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2006-08-18 15:42:05 +0000 |
| commit | 2e52ced18d9d59dcb4aa0ad559e5f65c427ef8d0 (patch) | |
| tree | dbdaafea7465708d771832b62b1508908e771fbd | |
| parent | beb68f4a20aebb56a249bd83f20d09c86e92723f (diff) | |
| download | ppe42-gcc-2e52ced18d9d59dcb4aa0ad559e5f65c427ef8d0.tar.gz ppe42-gcc-2e52ced18d9d59dcb4aa0ad559e5f65c427ef8d0.zip | |
2006-08-18 Paolo Carlini <pcarlini@suse.de>
PR libstdc++/28765
* include/ext/rc_string_base.h (_M_clear): New.
* include/ext/sso_string_base.h (_M_clear): Likewise.
* include/ext/vstring.h (clear): Use it.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116240 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | libstdc++-v3/ChangeLog | 7 | ||||
| -rw-r--r-- | libstdc++-v3/include/ext/rc_string_base.h | 4 | ||||
| -rw-r--r-- | libstdc++-v3/include/ext/sso_string_base.h | 4 | ||||
| -rw-r--r-- | libstdc++-v3/include/ext/vstring.h | 2 |
4 files changed, 16 insertions, 1 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index a9556d7a951..9d692ab132a 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2006-08-18 Paolo Carlini <pcarlini@suse.de> + + PR libstdc++/28765 + * include/ext/rc_string_base.h (_M_clear): New. + * include/ext/sso_string_base.h (_M_clear): Likewise. + * include/ext/vstring.h (clear): Use it. + 2006-08-15 Paolo Carlini <pcarlini@suse.de> * include/tr1/random (poisson_distribution<>::_M_initialize): Add. diff --git a/libstdc++-v3/include/ext/rc_string_base.h b/libstdc++-v3/include/ext/rc_string_base.h index eec6f2dcf0d..1a896d827fe 100644 --- a/libstdc++-v3/include/ext/rc_string_base.h +++ b/libstdc++-v3/include/ext/rc_string_base.h @@ -338,6 +338,10 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) void _M_erase(size_type __pos, size_type __n); + void + _M_clear() + { _M_erase(size_type(0), _M_length()); } + bool _M_compare(const __rc_string_base&) const { return false; } diff --git a/libstdc++-v3/include/ext/sso_string_base.h b/libstdc++-v3/include/ext/sso_string_base.h index 1282eb6e53e..30988260dd7 100644 --- a/libstdc++-v3/include/ext/sso_string_base.h +++ b/libstdc++-v3/include/ext/sso_string_base.h @@ -226,6 +226,10 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) void _M_erase(size_type __pos, size_type __n); + void + _M_clear() + { _M_set_length(0); } + bool _M_compare(const __sso_string_base&) const { return false; } diff --git a/libstdc++-v3/include/ext/vstring.h b/libstdc++-v3/include/ext/vstring.h index 5cd84b15a30..d858949db46 100644 --- a/libstdc++-v3/include/ext/vstring.h +++ b/libstdc++-v3/include/ext/vstring.h @@ -409,7 +409,7 @@ _GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx) */ void clear() - { this->_M_erase(size_type(0), this->size()); } + { this->_M_clear(); } /** * Returns true if the %string is empty. Equivalent to *this == "". |

