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:
parent
5e45859979
commit
a374e6435d
3 changed files with 8 additions and 7 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue