On 2020-11-28 10:37 a.m., Barnabás Pőcze wrote:
Hi
2020. november 28., szombat 15:08 keltezéssel, Hans de Goede írta:
[...]
+static_assert(ARRAY_SIZE(profile_names) == platform_profile_perform+1);
It would be better to add an extra member/entry at the end of the enum
named platform_profile_no_profiles; and then use that instead of
platform_profile_perform+1. Also see below where I use this too.
I'm not sure if it's just me, but when I read "no_profiles", then "number of probiles"
is not the first thing that comes to mind, maybe _end, _last, _max, etc.
would be harder to mistake for something else? What do you think?
FWIW - my vote would be platform_profile_last, it just seems to fit well
when reading the code.
Mark