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 --------------------- */ /* ------------------ Status von Einheiten --------------------- */
typedef int status_t; typedef unsigned char status_t;
enum { enum {
ST_AGGRO, ST_AGGRO,
ST_FIGHT, ST_FIGHT,
@ -474,7 +474,7 @@ enum {
/* ----------------- Parameter --------------------------------- */ /* ----------------- Parameter --------------------------------- */
typedef int param_t; typedef unsigned char param_t;
enum { enum {
P_LOCALE, P_LOCALE,
P_ANY, P_ANY,

View File

@ -82,8 +82,8 @@ typedef struct unit {
struct faction *faction; struct faction *faction;
struct building *building; struct building *building;
struct ship *ship; struct ship *ship;
short age;
unsigned short number; unsigned short number;
short age;
/* skill data */ /* skill data */
short skill_size; short skill_size;

View File

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