[Mesa-dev] [PATCH 06/23] i965: Define common register base class shared between both back-ends.
Francisco Jerez
currojerez at riseup.net
Mon Dec 2 12:32:04 PST 2013
Chris Forbes <chrisf at ijw.co.nz> writes:
> Ideally, we wouldn't need init() and you could just have a
> copy-constructor do the right thing, I think -- currently, all the
> backend_reg fields get initialized 3 times:
>
> - backend_reg ctor
> - init() blasting everything to zero
> - this assignment
>
Yeah, I completely agree, but this is nothing new. Changing that
probably belongs to a separate clean-up patch...
>
>
> On Tue, Dec 3, 2013 at 9:22 AM, Francisco Jerez <currojerez at riseup.net> wrote:
>> Chris Forbes <chrisf at ijw.co.nz> writes:
>>
>>> +fs_reg::fs_reg(const backend_reg ®)
>>> +{
>>> + init();
>>> + *static_cast<backend_reg *>(this) = reg;
>>>
>>> This is a bit gross...
>>
>> Would you prefer 'this->operator=(reg);'?
>>
>> Meh... :)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 229 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20131202/fd436f7a/attachment.pgp>
More information about the mesa-dev
mailing list