1
0
Fork 0

(svn r22562) -Codechange: Remove constness from TownGetVariable.

release/1.2
terkhen 2011-06-12 20:37:26 +00:00
parent f1cde00372
commit dd8a436cbb
5 changed files with 5 additions and 5 deletions

View File

@ -254,7 +254,7 @@ static uint32 GetDistanceFromNearbyHouse(uint8 parameter, TileIndex tile, HouseI
*/ */
static uint32 HouseGetVariable(const ResolverObject *object, byte variable, byte parameter, bool *available) static uint32 HouseGetVariable(const ResolverObject *object, byte variable, byte parameter, bool *available)
{ {
const Town *town = object->u.house.town; Town *town = object->u.house.town;
TileIndex tile = object->u.house.tile; TileIndex tile = object->u.house.tile;
HouseID house_id = object->u.house.house_id; HouseID house_id = object->u.house.house_id;

View File

@ -180,7 +180,7 @@ uint32 IndustryGetVariable(const ResolverObject *object, byte variable, byte par
/* Shall the variable get resolved in parent scope and are we not yet in parent scope? */ /* Shall the variable get resolved in parent scope and are we not yet in parent scope? */
if (object->u.industry.gfx == INVALID_INDUSTRYTILE && object->scope == VSG_SCOPE_PARENT) { if (object->u.industry.gfx == INVALID_INDUSTRYTILE && object->scope == VSG_SCOPE_PARENT) {
/* Pass the request on to the town of the industry */ /* Pass the request on to the town of the industry */
const Town *t; Town *t;
if (industry != NULL) { if (industry != NULL) {
t = industry->town; t = industry->town;

View File

@ -264,7 +264,7 @@ static uint32 StationGetVariable(const ResolverObject *object, byte variable, by
if (object->scope == VSG_SCOPE_PARENT) { if (object->scope == VSG_SCOPE_PARENT) {
/* Pass the request on to the town of the station */ /* Pass the request on to the town of the station */
const Town *t; Town *t;
if (st != NULL) { if (st != NULL) {
t = st->town; t = st->town;

View File

@ -21,7 +21,7 @@
* @param t is of course the town we are inquiring * @param t is of course the town we are inquiring
* @return the value stored in the corresponding variable * @return the value stored in the corresponding variable
*/ */
uint32 TownGetVariable(byte variable, byte parameter, bool *available, const Town *t) uint32 TownGetVariable(byte variable, byte parameter, bool *available, Town *t)
{ {
switch (variable) { switch (variable) {
/* Larger towns */ /* Larger towns */

View File

@ -17,6 +17,6 @@
/* Currently there is no direct town resolver; we only need to get town /* Currently there is no direct town resolver; we only need to get town
* variable results from inside stations, house tiles and industry tiles. */ * variable results from inside stations, house tiles and industry tiles. */
uint32 TownGetVariable(byte variable, byte parameter, bool *available, const Town *t); uint32 TownGetVariable(byte variable, byte parameter, bool *available, Town *t);
#endif /* NEWGRF_TOWN_H */ #endif /* NEWGRF_TOWN_H */