summaryrefslogtreecommitdiff
path: root/src/newgrf_cargo.cpp
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2011-07-04 20:31:57 +0000
committerfrosch <frosch@openttd.org>2011-07-04 20:31:57 +0000
commit8b18292a2ec1be31d7c1fe7cfcba26facb9c7ada (patch)
treed7620f4ae011379b988374683f8a38dacb49a2fb /src/newgrf_cargo.cpp
parentd2b236802cb202c07aa7586b197935b96dddee7b (diff)
downloadopenttd-8b18292a2ec1be31d7c1fe7cfcba26facb9c7ada.tar.xz
(svn r22634) -Codechange: Deduplicate some code. Note that zeroing 'count' is intentionally removed, it is only used together with 'scope'.
Diffstat (limited to 'src/newgrf_cargo.cpp')
-rw-r--r--src/newgrf_cargo.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/newgrf_cargo.cpp b/src/newgrf_cargo.cpp
index 257e96ee6..7eb397016 100644
--- a/src/newgrf_cargo.cpp
+++ b/src/newgrf_cargo.cpp
@@ -66,10 +66,8 @@ static void NewCargoResolver(ResolverObject *res, const CargoSpec *cs)
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 = cs->grffile;
}