s2geometry
s2geometry copied to clipboard
Better to use enum class instead of enum
eg. In s2shape_index.h:
enum InitialPosition { BEGIN, END, UNPOSITIONED };
Such an enum name like BEGIN
is very common, so it is easy to have the same name with a macro or other enum, which will cause conflict.
If changing it to enum class
is ok, I will make a PR to fix it.
Sure. You can call them kBegin
, etc.
I mean, send a PR to change it to:
enum class InitialPosition { kBegin, kEnd, kUnpositioned };
OK