mirror of
https://gitlab.freedesktop.org/libinput/libinput.git
synced 2025-12-25 08:10:05 +01:00
Replace one more __builtin_popcount with bitwise test
__builtin_popcount might not be available and in this case, a bitwise-and can accomplish the same task. Signed-off-by: Michael Forney <mforney@mforney.org>
This commit is contained in:
parent
552d5aeba5
commit
9c89ab6d95
1 changed files with 1 additions and 1 deletions
|
|
@ -1735,7 +1735,7 @@ tablet_update_tool_state(struct tablet_dispatch *tablet,
|
|||
|
||||
/* Kernel tools are supposed to be mutually exclusive, if we have
|
||||
* two set discard the most recent one. */
|
||||
if (__builtin_popcount(tablet->tool_state) > 1) {
|
||||
if (tablet->tool_state & (tablet->tool_state - 1)) {
|
||||
evdev_log_bug_kernel(device,
|
||||
"Multiple tools active simultaneously (%#x)\n",
|
||||
tablet->tool_state);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue