Avoid SCT_TYPE_MAX, use ARRAY_SIZE() instead

The next commit will get rid of SCT_TYPE_MAX.  Prepare.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
Markus Armbruster 2020-12-26 06:27:18 +01:00
parent d1b844c6eb
commit 6bad464348
3 changed files with 8 additions and 7 deletions

View file

@ -28,7 +28,7 @@
*
* Known contributors to this file:
* Ville Virrankoski, 1995
* Markus Armbruster, 2004-2016
* Markus Armbruster, 2004-2020
*/
#ifndef UPDATE_H
@ -59,7 +59,7 @@ struct budg_item {
/* A nation's budget for an update */
struct budget {
/* production by sector type */
struct budg_item prod[SCT_TYPE_MAX + 1];
struct budg_item prod[ARRAY_SIZE(dchr) - 1];
/* level production output */
float level[4];
/* building and maintenance */