mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-12 10:30:28 +00:00
(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.
|
||||
* @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);
|
||||
|
Loading…
Reference in New Issue
Block a user