On Tue, Nov 29, 2016 at 2:59 PM, Kyriazis, George
<[email protected]> wrote:
>
>> -----Original Message-----
>> From: [email protected] [mailto:[email protected]] On Behalf Of Ilia
>> Mirkin
>> Sent: Tuesday, November 29, 2016 1:54 PM
>> To: Kyriazis, George <[email protected]>
>> Cc: [email protected]
>> Subject: Re: [Mesa-dev] [PATCH] swr: Templetize std::max to work on
>> windows
>>
>> How about just making 'layers' unsigned? (Hm, I wonder why this didn't
>> trigger issues with gcc... maybe it should be +1u instead of +1?)
>>
> Could do that, too, but there are other places in our code that use 
> templetized versions of std::max.
>
> I guess gcc prioritizes implicit casts...  +1u does not help, since the 
> last_layer/first_layer fields are already unsigned.  It's the int vs unsigned 
> type mismatch that caused the issue.

OK. I'll let Tim/Bruce rule on this... my personal preference would be
to change the type of layers or switch to the MAX2() macro, but it's
been a while since I've done serious C++. If you do end up adding an
explicit type, maybe also adjust the next line's alignment so that it
matches up as it currently does.

Cheers,

  -ilia
_______________________________________________
mesa-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to