Follow-up Comment #2, patch #3036 (project freeciv):
I think this already exists -- if you were to #define SPECENUM_COUNT
trait_array_size before #including specenum_gen.h, for example, you'd get an
enum constant trait_array_size which could be used in place of
trait_max()+1. (Added in patch
Follow-up Comment #1, patch #3036 (project freeciv):
_size() might be a bit ambiguous -- it could be mistaken for the number of
enumeration items, which could be different since specenums can be sparse.
(I'm not sure we can easily provide the number of items.)
Perhaps _array_size()?
URL:
http://gna.org/patch/?3036
Summary: specenum _size()
Project: Freeciv
Submitted by: cazfi
Submitted on: Wed 09 Nov 2011 01:00:11 AM EET
Category: general
Priority: 3 - Low
Status: