[PATCH libinput 2/6] touchpad: use __builtin_ffs instead of a manual count
Peter Hutterer
peter.hutterer at who-t.net
Mon Jan 5 21:53:38 PST 2015
On Tue, Jan 06, 2015 at 01:39:24PM +0800, Jonas Ã…dahl wrote:
> 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.
fair enough, fixed locally.
Cheers,
Peter
More information about the wayland-devel
mailing list