diff options
author | frosch <frosch@openttd.org> | 2018-03-11 13:19:41 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2018-03-11 13:19:41 +0000 |
commit | d9d669dcf855e444a77141b4b96e5df1f13c7203 (patch) | |
tree | a90dc37970fd26211382b50c25b5680be5963955 /src/newgrf_industries.h | |
parent | 7c406f0d9dc365960f07e20e690cc0bdf8682fd6 (diff) | |
download | openttd-d9d669dcf855e444a77141b4b96e5df1f13c7203.tar.xz |
(svn r27984) -Codechange: Make ScopeResolver constructors/destructors inlineable. Speedup sprite resolving by about 8 percent.
Diffstat (limited to 'src/newgrf_industries.h')
-rw-r--r-- | src/newgrf_industries.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/newgrf_industries.h b/src/newgrf_industries.h index 45b0333a6..fa809fcd7 100644 --- a/src/newgrf_industries.h +++ b/src/newgrf_industries.h @@ -21,7 +21,18 @@ struct IndustriesScopeResolver : public ScopeResolver { IndustryType type; ///< Type of the industry. uint32 random_bits; ///< Random bits of the new industry. - IndustriesScopeResolver(ResolverObject &ro, TileIndex tile, Industry *industry, IndustryType type, uint32 random_bits = 0); + /** + * Scope resolver for industries. + * @param ro Surrounding resolver. + * @param tile %Tile owned by the industry. + * @param industry %Industry being resolved. + * @param type Type of the industry. + * @param random_bits Random bits of the new industry. + */ + IndustriesScopeResolver(ResolverObject &ro, TileIndex tile, Industry *industry, IndustryType type, uint32 random_bits = 0) + : ScopeResolver(ro), tile(tile), industry(industry), type(type), random_bits(random_bits) + { + } /* virtual */ uint32 GetRandomBits() const; /* virtual */ uint32 GetVariable(byte variable, uint32 parameter, bool *available) const; |