[RFC] Enum improvements

Jean-Marc Lasgouttes lasgouttes at lyx.org
Sun Nov 29 22:00:21 UTC 2020


Le 29/11/2020 à 09:33, Yuriy Skalko a écrit :
>> Another thing to look at: we have plenty of enums used a bitfields 
>> where we have defined special operators (some are mine) I only 
>> realized recently that it does not make sense. A good example is 
>> KeyModifier. I suspect that we should use 'int' instead of casting 
>> back to the original enum type. There are complex tamplate-based 
>> solutions to this, but I am not sure they are worth the hassle.
> 
> Like in attached patch? I think `unsigned` instead of `int` will be 
> better for bit fiddling.

Looks good, although we tend to use "unsigned int" instead of "unsigned" 
in terms of style.

JMarc




More information about the lyx-devel mailing list