(svn r19481) -Codechange: Turn _industry_counts into a static member of Industry.

This commit is contained in:
frosch
2010-03-20 14:30:16 +00:00
parent 55bc2c58ea
commit be6c18454a
7 changed files with 54 additions and 48 deletions

View File

@@ -107,12 +107,12 @@ static void Load_INDY()
{
int index;
ResetIndustryCounts();
Industry::ResetIndustryCounts();
while ((index = SlIterateArray()) != -1) {
Industry *i = new (index) Industry();
SlObject(i, _industry_desc);
IncIndustryTypeCount(i->type);
Industry::IncIndustryTypeCount(i->type);
}
}

View File

@@ -841,7 +841,7 @@ static bool LoadOldIndustry(LoadgameState *ls, int num)
i->random_colour = RemapTTOColour(i->random_colour);
}
IncIndustryTypeCount(i->type);
Industry::IncIndustryTypeCount(i->type);
} else {
delete i;
}