From 8b18292a2ec1be31d7c1fe7cfcba26facb9c7ada Mon Sep 17 00:00:00 2001 From: frosch Date: Mon, 4 Jul 2011 20:31:57 +0000 Subject: (svn r22634) -Codechange: Deduplicate some code. Note that zeroing 'count' is intentionally removed, it is only used together with 'scope'. --- src/newgrf_station.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/newgrf_station.cpp') diff --git a/src/newgrf_station.cpp b/src/newgrf_station.cpp index 07ed47af8..e3178feaa 100644 --- a/src/newgrf_station.cpp +++ b/src/newgrf_station.cpp @@ -548,10 +548,8 @@ static void NewStationResolver(ResolverObject *res, const StationSpec *statspec, res->callback = CBID_NO_CALLBACK; res->callback_param1 = 0; res->callback_param2 = 0; - res->last_value = 0; - res->trigger = 0; - res->reseed = 0; - res->count = 0; + res->ResetState(); + res->grffile = (statspec != NULL ? statspec->grf_prop.grffile : NULL); /* Invalidate all cached vars */ -- cgit v1.2.3-54-g00ecf