[riot-notifications] [RIOT] Replace all numeric constants by macros (#136)
notifications at github.com
Thu Aug 15 20:15:35 CEST 2013
Sure single valued enums do not make sense. Even for double valued enums you should think twice if a boolean value would not be better, but especially for values of function parameters enums are the better choice (only surpassed by bit flags for multivalued stuff) because the compiler actually can check if the given value is legal or not.
TLDR: My rule of thumb always is: Flag value or some constant => Macro, function parameter value => if (possible values > 2) then enum else boolean arithmetics (0 one value, rest other value).
Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the notifications