# HG changeset patch # User frosch # Date 2012-04-22 16:28:23 # Node ID e2eff9dbb4f22a3a60d9b7657c3b37ed577e558b # Parent 619ce1a2ca96f24fcde49a077d2a94dc4fc37ada (svn r24168) -Codechange: Simplify default station class instantiation. diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -33,15 +33,11 @@ template (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(1); - classes[1].spec[0] = NULL; + classes[1].Insert(NULL); } INSTANTIATE_NEWGRF_CLASS_METHODS(StationClass, StationSpec, StationClassID, STAT_CLASS_MAX)