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_canal.cpp | |
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_canal.cpp')
-rw-r--r-- | src/newgrf_canal.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/newgrf_canal.cpp b/src/newgrf_canal.cpp index cba19cbdb..3438bb985 100644 --- a/src/newgrf_canal.cpp +++ b/src/newgrf_canal.cpp @@ -25,7 +25,10 @@ WaterFeature _water_feature[CF_END]; struct CanalScopeResolver : public ScopeResolver { TileIndex tile; ///< Tile containing the canal. - CanalScopeResolver(ResolverObject &ro, TileIndex tile); + CanalScopeResolver(ResolverObject &ro, TileIndex tile) + : ScopeResolver(ro), tile(tile) + { + } /* virtual */ uint32 GetRandomBits() const; /* virtual */ uint32 GetVariable(byte variable, uint32 parameter, bool *available) const; @@ -110,11 +113,6 @@ struct CanalResolverObject : public ResolverObject { return group->loaded[0]; } -CanalScopeResolver::CanalScopeResolver(ResolverObject &ro, TileIndex tile) : ScopeResolver(ro) -{ - this->tile = tile; -} - /** * Canal resolver constructor. * @param feature Which canal feature we want. |