summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-11-13 10:17:16 +0000
committeralberth <alberth@openttd.org>2010-11-13 10:17:16 +0000
commit239fcc8ccdd201665bd4aaa76268503fefe94712 (patch)
tree4e706e8f1f7045d6aad99ac1ba7074ce5a11f482 /src
parent6c088543c1407e4ef0531babe6b870c676528946 (diff)
downloadopenttd-239fcc8ccdd201665bd4aaa76268503fefe94712.tar.xz
(svn r21159) -Codechange: AdvertiseIndustryOpening() also works with a const pointer.
Diffstat (limited to 'src')
-rw-r--r--src/industry_cmd.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/industry_cmd.cpp b/src/industry_cmd.cpp
index aff016ae6..e7df05c18 100644
--- a/src/industry_cmd.cpp
+++ b/src/industry_cmd.cpp
@@ -1905,7 +1905,7 @@ static uint GetNumberOfIndustries()
* Advertise about a new industry opening.
* @param ind Industry being opened.
*/
-static void AdvertiseIndustryOpening(Industry *ind)
+static void AdvertiseIndustryOpening(const Industry *ind)
{
const IndustrySpec *ind_spc = GetIndustrySpec(ind->type);
SetDParam(0, ind_spc->name);
@@ -2080,7 +2080,7 @@ static void MaybeNewIndustry()
}
/* try to create 2000 times this industry */
- Industry *ind = PlaceIndustry(cumulative_probs[j].ind, IACT_RANDOMCREATION, false);
+ const Industry *ind = PlaceIndustry(cumulative_probs[j].ind, IACT_RANDOMCREATION, false);
if (ind == NULL) return;
AdvertiseIndustryOpening(ind);