reduced the size of some data types (won't help much, but might help a little)

This commit is contained in:
Enno Rehling 2005-06-11 17:10:55 +00:00
parent b95b7fd9b1
commit 01fd653508
3 changed files with 5 additions and 6 deletions

View File

@ -462,7 +462,7 @@ extern const char *keywords[MAXKEYWORDS];
/* ------------------ Status von Einheiten --------------------- */
typedef int status_t;
typedef unsigned char status_t;
enum {
ST_AGGRO,
ST_FIGHT,
@ -474,7 +474,7 @@ enum {
/* ----------------- Parameter --------------------------------- */
typedef int param_t;
typedef unsigned char param_t;
enum {
P_LOCALE,
P_ANY,

View File

@ -82,8 +82,8 @@ typedef struct unit {
struct faction *faction;
struct building *building;
struct ship *ship;
short age;
unsigned short number;
short age;
/* skill data */
short skill_size;
@ -112,8 +112,8 @@ typedef struct unit {
unsigned int flags;
struct attrib * attribs;
status_t status;
int n; /* enno: attribut? */
int wants; /* enno: attribut? */
int n; /* enno: attribut? */
int wants; /* enno: attribut? */
} unit;
typedef struct unit_list {

View File

@ -363,7 +363,6 @@ parse_calendar(xmlDocPtr doc)
seasons = nsetSeasons->nodeNr;
seasonnames = malloc(sizeof(char *) * seasons);
storms = malloc(sizeof(int) * seasons);
for (i=0;i!=nsetSeasons->nodeNr;++i) {
xmlNodePtr season = nsetSeasons->nodeTab[i];