[1/2] msvcirt: Add initial implementation of streambuf

Piotr Caban piotr.caban at gmail.com
Tue Jun 2 08:38:25 CDT 2015


On 06/02/15 14:52, Iván Matellanes wrote:
> +/* ??0streambuf@@IAE at XZ */
> +/* ??0streambuf@@IEAA at XZ */
> +DEFINE_THISCALL_WRAPPER(streambuf_ctor, 4)
> +streambuf* __thiscall streambuf_ctor(streambuf *this)
> +{
> +    TRACE("(%p)\n", this);
> +    this->vtable = &MSVCP_streambuf_vtable;
> +    this->allocated = 0;
> +    this->unbuffered = 0;
> +    this->unknown = -1;
> +    this->unknown2 = -1;
> +    streambuf_setb(this, NULL, NULL, 0);
> +    streambuf_setg(this, NULL, NULL, NULL);
> +    streambuf_setp(this, NULL, NULL);
> +    InitializeCriticalSection(&this->lock);
> +    return this;
> +}
Can't it be simplified to:
streambuf* __thiscall streambuf_ctor(streambuf *this)
{
     return streambuf_reserve_ctor(this, NULL, 0);
}
?




More information about the wine-devel mailing list