diff options
author | terkhen <terkhen@openttd.org> | 2011-06-12 20:31:44 +0000 |
---|---|---|
committer | terkhen <terkhen@openttd.org> | 2011-06-12 20:31:44 +0000 |
commit | d7ec492887674362c6a054b28faf26707932df64 (patch) | |
tree | f06af8ab86ace002f04cd96e94ca488f261a75a8 | |
parent | f12e71e1bebde01ce5c89db8d102d742acc45ac7 (diff) | |
download | openttd-d7ec492887674362c6a054b28faf26707932df64.tar.xz |
(svn r22556) -Codechange: Remove constness from the town pointer at industries.
-rw-r--r-- | src/industry.h | 2 | ||||
-rw-r--r-- | src/industry_cmd.cpp | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/industry.h b/src/industry.h index 18a20a775..ba8c06ed5 100644 --- a/src/industry.h +++ b/src/industry.h @@ -41,7 +41,7 @@ struct Industry : IndustryPool::PoolItem<&_industry_pool> { typedef PersistentStorageArray<int32, 16> PersistentStorage; TileArea location; ///< Location of the industry - const Town *town; ///< Nearest town + Town *town; ///< Nearest town CargoID produced_cargo[2]; ///< 2 production cargo slots uint16 produced_cargo_waiting[2]; ///< amount of cargo produced per cargo uint16 incoming_cargo_waiting[3]; ///< incoming cargo waiting to be processed diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp index 4a0391a50..616dd317c 100644 --- a/src/industry_cmd.cpp +++ b/src/industry_cmd.cpp @@ -1271,7 +1271,7 @@ static CheckNewIndustryProc * const _check_new_industry_procs[CHECK_END] = { * @precond \c *t != NULL * @postcon \c *t points to a town on success, and \c NULL on failure. */ -static CommandCost FindTownForIndustry(TileIndex tile, int type, const Town **t) +static CommandCost FindTownForIndustry(TileIndex tile, int type, Town **t) { *t = ClosestTownFromTile(tile, UINT_MAX); @@ -1540,7 +1540,7 @@ static CommandCost CheckIfFarEnoughFromConflictingIndustry(TileIndex tile, int t * @param founder Founder of the industry; OWNER_NONE in case of random construction. * @param initial_random_bits Random bits for the industry. */ -static void DoCreateNewIndustry(Industry *i, TileIndex tile, IndustryType type, const IndustryTileTable *it, byte layout, const Town *t, Owner founder, uint16 initial_random_bits) +static void DoCreateNewIndustry(Industry *i, TileIndex tile, IndustryType type, const IndustryTileTable *it, byte layout, Town *t, Owner founder, uint16 initial_random_bits) { const IndustrySpec *indspec = GetIndustrySpec(type); @@ -1704,7 +1704,7 @@ static CommandCost CreateNewIndustryHelper(TileIndex tile, IndustryType type, Do ret = CheckIfFarEnoughFromConflictingIndustry(tile, type); if (ret.Failed()) return ret; - const Town *t = NULL; + Town *t = NULL; ret = FindTownForIndustry(tile, type, &t); if (ret.Failed()) return ret; assert(t != NULL); |