Use int instead of long for flags
As long as symbol_by_value(), show_capab() and togg() support only int, flags need to fit into int. Not a problem in practice, because no machine capable of running Empire has int narrower than 32 bits, and 32 bits suffice. Some flags members are long instead of int: struct lchrstr member l_flags, struct natstr member nat_flags, struct mchrstr member m_flags are long. Waste of space on machines with long wider than int. Change them to int. Rearrange struct lchrstr and struct natstr to avoid holes.
This commit is contained in:
parent
77f8846273
commit
e51b3fb842
9 changed files with 379 additions and 379 deletions
|
@ -31,7 +31,7 @@
|
|||
* Ken Stevens, 1995
|
||||
* Steve McClure, 1998-2000
|
||||
* Ron Koenderink, 2005-2008
|
||||
* Markus Armbruster, 2005-2011
|
||||
* Markus Armbruster, 2005-2013
|
||||
*/
|
||||
|
||||
#ifndef NAT_H
|
||||
|
@ -91,6 +91,7 @@ struct natstr {
|
|||
natid nat_cnum; /* our country number */
|
||||
/* end of part matching struct empobj */
|
||||
enum nat_status nat_stat;
|
||||
int nat_flags; /* nation flags */
|
||||
char nat_cnam[20]; /* country name */
|
||||
char nat_pnam[20]; /* representative */
|
||||
char nat_hostaddr[46]; /* host addr of last user */
|
||||
|
@ -114,7 +115,6 @@ struct natstr {
|
|||
unsigned char nat_relate[MAXNOC];
|
||||
unsigned char nat_contact[MAXNOC];
|
||||
unsigned char nat_rejects[MAXNOC];
|
||||
long nat_flags; /* nation flags */
|
||||
};
|
||||
|
||||
/* nation relation codes */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue