Commit 4571fbb1 by Paolo Carlini Committed by Paolo Carlini

std_sstream.h (str()): Tidy.

2003-05-02  Paolo Carlini  <pcarlini@unitus.it>

	* include/std/std_sstream.h (str()): Tidy.

From-SVN: r66402
parent 07a0a044
2003-05-02 Paolo Carlini <pcarlini@unitus.it>
* include/std/std_sstream.h (str()): Tidy.
2003-05-02 Nathan Myers <ncm@cantrip.org> 2003-05-02 Nathan Myers <ncm@cantrip.org>
Paolo Carlini <pcarlini@unitus.it> Paolo Carlini <pcarlini@unitus.it>
......
...@@ -133,15 +133,11 @@ namespace std ...@@ -133,15 +133,11 @@ namespace std
__string_type __string_type
str() const str() const
{ {
const bool __testout = this->_M_mode & ios_base::out;
__string_type __ret = _M_string; __string_type __ret = _M_string;
if (this->_M_mode & ios_base::out) if (__testout && this->_M_out_beg < this->_M_out_lim)
{ __ret = __string_type(this->_M_out_beg,
const __size_type __nlen = this->_M_out_lim this->_M_out_lim);
- this->_M_out_beg;
if (__nlen)
__ret = __string_type(this->_M_out_beg,
this->_M_out_beg + __nlen);
}
return __ret; return __ret;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment