This is the mail archive of the
libstdc++@sourceware.cygnus.com
mailing list for the libstdc++ project.
Re: std_sstream.h - patch
- To: libstdc++@sourceware.cygnus.com
- Subject: Re: std_sstream.h - patch
- From: Benjamin Kosnik <bkoz@cygnus.com>
- Date: Wed, 26 May 1999 20:03:45 -0700 (PDT)
> The attached patch contains two optimizations for basic_stringbuf<>:
>
> 1. In the default constructor I changed _M_str(__string_type()) to _M_str().
>
> 2. In setbuf I changed the return value type and I removed the
> temporary __string_type object. Now if the new buffer length is smaller
> than the old one no reallocation is necessary.
I checked this in, thanks. I saved the dynamic_cast: it does not harm the
generated code, is legal c++, and clarifies that a conversion from derived
to base is happening.
Thanks,
Benjamin