diff options
author | kan <kan@FreeBSD.org> | 2005-06-03 03:29:38 +0000 |
---|---|---|
committer | kan <kan@FreeBSD.org> | 2005-06-03 03:29:38 +0000 |
commit | 3b6c93380e20c56b8151f9c6fc3916670b987df5 (patch) | |
tree | c4e455c4fe8d2a3ed1d621536386e3e252ad36bc /contrib/libstdc++/include/std/std_sstream.h | |
parent | 2156e40a831a8e0ab68e4bc091c2940bf46ca6df (diff) | |
download | FreeBSD-src-3b6c93380e20c56b8151f9c6fc3916670b987df5.zip FreeBSD-src-3b6c93380e20c56b8151f9c6fc3916670b987df5.tar.gz |
Gcc 3.4.4 C++ support bits.
Diffstat (limited to 'contrib/libstdc++/include/std/std_sstream.h')
-rw-r--r-- | contrib/libstdc++/include/std/std_sstream.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/contrib/libstdc++/include/std/std_sstream.h b/contrib/libstdc++/include/std/std_sstream.h index 6b5728b..0a6738a 100644 --- a/contrib/libstdc++/include/std/std_sstream.h +++ b/contrib/libstdc++/include/std/std_sstream.h @@ -111,8 +111,8 @@ namespace std */ explicit basic_stringbuf(ios_base::openmode __mode = ios_base::in | ios_base::out) - : __streambuf_type(), _M_mode(), _M_string() - { _M_stringbuf_init(__mode); } + : __streambuf_type(), _M_mode(__mode), _M_string() + { } /** * @brief Starts with an existing string buffer. @@ -140,8 +140,7 @@ namespace std __string_type str() const { - const bool __testout = this->_M_mode & ios_base::out; - if (__testout) + if (this->pptr()) { // The current egptr() may not be the actual string end. if (this->pptr() > this->egptr()) @@ -169,7 +168,7 @@ namespace std } protected: - // Common initialization code for both ctors goes here. + // Common initialization code goes here. /** * @if maint * @doctodo @@ -277,9 +276,8 @@ namespace std _M_update_egptr() { const bool __testin = this->_M_mode & ios_base::in; - const bool __testout = this->_M_mode & ios_base::out; - if (__testout && this->pptr() > this->egptr()) + if (this->pptr() && this->pptr() > this->egptr()) if (__testin) this->setg(this->eback(), this->gptr(), this->pptr()); else |