diff -r de259c566e37 src/landscape.h --- a/src/landscape.h Fri Oct 17 18:03:55 2008 +0200 +++ b/src/landscape.h Fri Oct 17 18:04:32 2008 +0200 @@ -10,10 +10,15 @@ #include "slope_type.h" #include "direction_type.h" -enum { - SNOW_LINE_MONTHS = 12, - SNOW_LINE_DAYS = 32, -}; +/** Number of months in the snow line table. + * @see SnowLine + */ +static const uint SNOW_LINE_MONTHS = 12; + +/** Number of days in each month in the snow line table. + * @see SnowLine + */ +static const uint SNOW_LINE_DAYS = 32; /** Structure describing the height of the snow line each day of the year */ struct SnowLine { diff -r de259c566e37 src/newgrf.cpp --- a/src/newgrf.cpp Fri Oct 17 18:03:55 2008 +0200 +++ b/src/newgrf.cpp Fri Oct 17 18:04:32 2008 +0200 @@ -1737,7 +1737,7 @@ case 0x10: // Snow line height table if (numinfo > 1 || IsSnowLineSet()) { grfmsg(1, "GlobalVarChangeInfo: The snowline can only be set once (%d)", numinfo); - } else if (len < SNOW_LINE_MONTHS * SNOW_LINE_DAYS) { + } else if (len < (int)(SNOW_LINE_MONTHS * SNOW_LINE_DAYS)) { grfmsg(1, "GlobalVarChangeInfo: Not enough entries set in the snowline table (%d)", len); } else { byte table[SNOW_LINE_MONTHS][SNOW_LINE_DAYS]; diff -r de259c566e37 src/station_cmd.cpp --- a/src/station_cmd.cpp Fri Oct 17 18:03:55 2008 +0200 +++ b/src/station_cmd.cpp Fri Oct 17 18:04:32 2008 +0200 @@ -425,7 +425,7 @@ void GetProductionAroundTiles(AcceptedCargo produced, TileIndex tile, int w, int h, int rad) { - memset(produced, 0, sizeof(AcceptedCargo)); + memset(produced, 0, sizeof(produced)); int x = TileX(tile); int y = TileY(tile); @@ -451,7 +451,7 @@ GetProducedCargoProc *gpc = _tile_type_procs[GetTileType(tile)]->get_produced_cargo_proc; if (gpc != NULL) { CargoID cargos[256]; // Required for CBID_HOUSE_PRODUCE_CARGO. - memset(cargos, CT_INVALID, 256); + memset(cargos, CT_INVALID, sizeof(cargos)); gpc(tile, cargos); for (uint i = 0; i < lengthof(cargos); ++i) { @@ -474,7 +474,7 @@ void GetAcceptanceAroundTiles(AcceptedCargo accepts, TileIndex tile, int w, int h, int rad) { - memset(accepts, 0, sizeof(AcceptedCargo)); + memset(accepts, 0, sizeof(accepts)); int x = TileX(tile); int y = TileY(tile);