2011/6/8 Chris Bandy <cba...@jbandy.com> > On 06/08/2011 06:38 AM, Benjamin Bellec wrote: > > Here is the v4 patch. > > > > Benjamin > > As an uninformed bystander, I have some nitpicks that may just be coding > style. > > From the patch: > > + if (x <= 1) > + return 1; > > > I think it would make more sense to move this above the #ifdef and not > duplicate it in each implementation. It's about the function input, not > the implementations. > I thought to that, but given that declaration must be before the code, in the "gcc path" you will have the declaration of "val" which is not used... you will have a GCC warning. Moreover, I think doing this slightly reduces the code readibility (the two "path" would be imbricated).
> > From the patch: > > + else > + return (1 << ((sizeof(unsigned) * 8) - __builtin_clz(x - 1))); > > > I don't like else after return. The else can be removed entirely. > > -- Chris > If you really really want, I can do a v5 patch ;-) Benjamin
_______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev