(svn r27984) -Codechange: Make ScopeResolver constructors/destructors inlineable. Speedup sprite resolving by about 8 percent.

This commit is contained in:
frosch
2018-03-11 13:19:41 +00:00
parent 7c406f0d9d
commit d9d669dcf8
23 changed files with 145 additions and 220 deletions

View File

@@ -30,7 +30,17 @@ struct StationScopeResolver : public ScopeResolver {
CargoID cargo_type; ///< Type of cargo of the station.
Axis axis; ///< Station axis, used only for the slope check callback.
StationScopeResolver(ResolverObject &ro, const StationSpec *statspec, BaseStation *st, TileIndex tile);
/**
* Constructor for station scopes.
* @param ro Surrounding resolver.
* @param statspec Station (type) specification.
* @param st Instance of the station.
* @param tile %Tile of the station.
*/
StationScopeResolver(ResolverObject &ro, const StationSpec *statspec, BaseStation *st, TileIndex tile)
: ScopeResolver(ro), tile(tile), st(st), statspec(statspec), cargo_type(CT_INVALID), axis(INVALID_AXIS)
{
}
/* virtual */ uint32 GetRandomBits() const;
/* virtual */ uint32 GetTriggers() const;