Is there any particular reason (besides legacy) that many parts of the code
still use int/#define, instead of using enums?

Even though C-compilers don't typecheck enums, there is a documentation /
readability benefit to using enums. Using enum-forward declaration avoids
any header nastiness.

For example ...

void BKE_nurbList_handles_set(struct ListBase *editnurb, int mode);

void BKE_nurbList_handles_set(struct ListBase *editnurb, enum
eHandleSetModes mode);

The latter is much easier to understand and investigate.

I'd personally like to make patches which simply add the proper enum types
to help document things for myself and others. Any reason not to do this?
_______________________________________________
Bf-committers mailing list
Bf-committers@blender.org
http://lists.blender.org/mailman/listinfo/bf-committers

Reply via email to