[PATCH libinput 2/6] touchpad: use __builtin_ffs instead of a manual count
Jonas Ã…dahl
jadahl at gmail.com
Mon Jan 5 21:39:24 PST 2015
On Tue, Jan 06, 2015 at 01:00:08PM +1000, Peter Hutterer wrote:
> On Mon, Jan 05, 2015 at 04:29:48PM -0800, Thiago Macieira wrote:
> > On Monday 05 January 2015 12:00:24 Hans de Goede wrote:
> > > > + return __builtin_ffs(tp->fake_touches >> 1);
> >
> > Why the builtin instead of ffs from <strings.h>?
>
> simple answer: was the first one that google came up with. does it matter
> much though? it's supported by gcc and clang.
Consistency and I suppose aesthetics. We already use ffs elsewhere in
libinput.
Jonas
>
> Cheers,
> Peter
> _______________________________________________
> wayland-devel mailing list
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
More information about the wayland-devel
mailing list