summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorterkhen <terkhen@openttd.org>2011-06-12 20:37:26 +0000
committerterkhen <terkhen@openttd.org>2011-06-12 20:37:26 +0000
commitdd8a436cbb997968431554fa5b2406cee8fb97ac (patch)
tree91d69612a879ad1c3c6607d63e8ea354a16a5bf6
parentf1cde00372ccb90b56919a3e647e7a05a7dc672d (diff)
downloadopenttd-dd8a436cbb997968431554fa5b2406cee8fb97ac.tar.xz
(svn r22562) -Codechange: Remove constness from TownGetVariable.
-rw-r--r--src/newgrf_house.cpp2
-rw-r--r--src/newgrf_industries.cpp2
-rw-r--r--src/newgrf_station.cpp2
-rw-r--r--src/newgrf_town.cpp2
-rw-r--r--src/newgrf_town.h2
5 files changed, 5 insertions, 5 deletions
diff --git a/src/newgrf_house.cpp b/src/newgrf_house.cpp
index 779f6cd3f..52eb7b286 100644
--- a/src/newgrf_house.cpp
+++ b/src/newgrf_house.cpp
@@ -254,7 +254,7 @@ static uint32 GetDistanceFromNearbyHouse(uint8 parameter, TileIndex tile, HouseI
*/
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;
HouseID house_id = object->u.house.house_id;
diff --git a/src/newgrf_industries.cpp b/src/newgrf_industries.cpp
index e89a1d7ed..b17c5a8d2 100644
--- a/src/newgrf_industries.cpp
+++ b/src/newgrf_industries.cpp
@@ -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? */
if (object->u.industry.gfx == INVALID_INDUSTRYTILE && object->scope == VSG_SCOPE_PARENT) {
/* Pass the request on to the town of the industry */
- const Town *t;
+ Town *t;
if (industry != NULL) {
t = industry->town;
diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp
index 83fca3d24..25dc06440 100644
--- a/src/newgrf_station.cpp
+++ b/src/newgrf_station.cpp
@@ -264,7 +264,7 @@ static uint32 StationGetVariable(const ResolverObject *object, byte variable, by
if (object->scope == VSG_SCOPE_PARENT) {
/* Pass the request on to the town of the station */
- const Town *t;
+ Town *t;
if (st != NULL) {
t = st->town;
diff --git a/src/newgrf_town.cpp b/src/newgrf_town.cpp
index 2dfc05b2a..230c416bb 100644
--- a/src/newgrf_town.cpp
+++ b/src/newgrf_town.cpp
@@ -21,7 +21,7 @@
* @param t is of course the town we are inquiring
* @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) {
/* Larger towns */
diff --git a/src/newgrf_town.h b/src/newgrf_town.h
index bf888229e..090b3b67e 100644
--- a/src/newgrf_town.h
+++ b/src/newgrf_town.h
@@ -17,6 +17,6 @@
/* Currently there is no direct town resolver; we only need to get town
* 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 */