summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2012-04-22 16:28:23 +0000
committerfrosch <frosch@openttd.org>2012-04-22 16:28:23 +0000
commit6d9a0ff72396fc99151878e551fd0756ef71ce64 (patch)
tree524155988e4dc1a956487b4dd8844187de10b504 /src
parentc841a78f69370c2bf806cbe6c89b58ed8efc0bac (diff)
downloadopenttd-6d9a0ff72396fc99151878e551fd0756ef71ce64.tar.xz
(svn r24168) -Codechange: Simplify default station class instantiation.
Diffstat (limited to 'src')
-rw-r--r--src/newgrf_station.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp
index e48ad935d..38e2507ee 100644
--- a/src/newgrf_station.cpp
+++ b/src/newgrf_station.cpp
@@ -33,15 +33,11 @@ template <typename Tspec, typename Tid, Tid Tmax>
/* 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)