John Spray wrote: > Hmm, I see that num_units is actually the number of units +1. Why not > fix this in the backend instead, to make the frontend code more obvious? > > - int const num_units = int(sizeof(unit_name) / sizeof(unit_name[0])); > + int const num_units = int(sizeof(unit_name) / sizeof(unit_name[0]) - > 1);
Yes, I agree that this is cleaner. Jürgen