[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:36:50 PST 2013


Francisco Jerez <currojerez at riseup.net> writes:

> Chris Forbes <chrisf at ijw.co.nz> writes:
>
>> +fs_reg::fs_reg(const backend_reg &reg)
>> +{
>> +   init();
>> +   *static_cast<backend_reg *>(this) = reg;
>>
>> This is a bit gross...
>
> Would you prefer 'this->operator=(reg);'?
>
I just remembered...  The reason this wouldn't work is that it would
trigger an implicit conversion from 'backend_reg' to 'fs_reg', causing
infinite recursion into the fs_reg constructor.

> 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/627028aa/attachment.pgp>


More information about the mesa-dev mailing list