[Bf-committers] Problem with UI colors, second attempt

Douglas Toltzman doug at oakstreetsoftware.com
Fri Dec 3 00:10:05 CET 2004


You don't need to resert to #defines, which cannot be type-checked by the
compiler.  You can assign arbitrary values in an enumeration.

e.g.
enum foo {
	foo_jack=10,
	foo_jill,
	foo_hill,
	foo_crown,
	foo_bottom=100
};

foo_jill will be 11, foo_hill will be 12, etc.


On Fri, 3 Dec 2004, Alexander Ewering wrote:
> Well, see, that's why I think enums are not a great way for this kind
> of stuff. #defines allow for more freedom, for example, to just skip a row of
> numbers, like has been done in various other places in Blender.


Best regards,
Douglas Toltzman




More information about the Bf-committers mailing list