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

Iván Matellanes matellanesivan at gmail.com
Tue Jun 2 08:46:59 CDT 2015


El 02/06/15 a las 15:38, Piotr Caban escribió:
> 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);
> }
> ?
> 
You're right, it can be simplified. The value of this->unbuffered will be different, though. I will resend.

Iván.



More information about the wine-devel mailing list