mirror of https://github.com/OpenTTD/OpenTTD.git
(svn r21159) -Codechange: AdvertiseIndustryOpening() also works with a const pointer.
This commit is contained in:
parent
6c088543c1
commit
239fcc8ccd
|
@ -1905,7 +1905,7 @@ static uint GetNumberOfIndustries()
|
||||||
* Advertise about a new industry opening.
|
* Advertise about a new industry opening.
|
||||||
* @param ind Industry being opened.
|
* @param ind Industry being opened.
|
||||||
*/
|
*/
|
||||||
static void AdvertiseIndustryOpening(Industry *ind)
|
static void AdvertiseIndustryOpening(const Industry *ind)
|
||||||
{
|
{
|
||||||
const IndustrySpec *ind_spc = GetIndustrySpec(ind->type);
|
const IndustrySpec *ind_spc = GetIndustrySpec(ind->type);
|
||||||
SetDParam(0, ind_spc->name);
|
SetDParam(0, ind_spc->name);
|
||||||
|
@ -2080,7 +2080,7 @@ static void MaybeNewIndustry()
|
||||||
}
|
}
|
||||||
|
|
||||||
/* try to create 2000 times this industry */
|
/* 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;
|
if (ind == NULL) return;
|
||||||
|
|
||||||
AdvertiseIndustryOpening(ind);
|
AdvertiseIndustryOpening(ind);
|
||||||
|
|
Loading…
Reference in New Issue