Mercurial > hg > openttd
changeset 19279:a6f596501843 draft
(svn r24168) -Codechange: Simplify default station class instantiation.
author | frosch <frosch@openttd.org> |
---|---|
date | Sun, 22 Apr 2012 16:28:23 +0000 |
parents | 2f2ce8473772 |
children | 9b3c90122b9b |
files | src/newgrf_station.cpp |
diffstat | 1 files changed, 2 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -33,15 +33,11 @@ /* Set up initial data */ classes[0].global_id = 'DFLT'; classes[0].name = STR_STATION_CLASS_DFLT; - classes[0].count = 1; - classes[0].spec = MallocT<StationSpec*>(1); - classes[0].spec[0] = NULL; + classes[0].Insert(NULL); classes[1].global_id = 'WAYP'; classes[1].name = STR_STATION_CLASS_WAYP; - classes[1].count = 1; - classes[1].spec = MallocT<StationSpec*>(1); - classes[1].spec[0] = NULL; + classes[1].Insert(NULL); } INSTANTIATE_NEWGRF_CLASS_METHODS(StationClass, StationSpec, StationClassID, STAT_CLASS_MAX)