Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 8759d674 authored by Michael Wright's avatar Michael Wright
Browse files

Automatically generate flag value strings for flag enums.

Since there can generally only be a maximum of 64 flags for a given
flage type, it isn't that expensive to generate the array of names at
compile time by enumerating the possible flag values and then using a
templated function's debug signature to extract the name. The debug
signature should be relatively stable, and I've confirmed this works on
both GCC as well as clang. If our parsing fails, however, we should just
fallback to bare hex values again. Our tests should hopefully prevent
this from happening for any extended period of time.

Bug: 160010896
Test: atest libinput_tests
Change-Id: I752100bbefb92e7a0ecf7a8473a47e37ff7b1662
parent 7aab8a09
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment