(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

@@ -222,21 +222,6 @@ AirportTileResolverObject::AirportTileResolverObject(const AirportTileSpec *ats,
this->root_spritegroup = ats->grf_prop.spritegroup[0];
}
/**
* Constructor of the scope resolver specific for airport tiles.
* @param ats Specification of the airport tiles.
* @param tile %Tile for the callback, only valid for airporttile callbacks.
* @param st Station of the airport for which the callback is run, or \c NULL for build gui.
*/
AirportTileScopeResolver::AirportTileScopeResolver(ResolverObject &ro, const AirportTileSpec *ats, TileIndex tile, Station *st) : ScopeResolver(ro)
{
assert(st != NULL);
this->st = st;
this->airport_id = st->airport.type;
this->tile = tile;
}
uint16 GetAirportTileCallback(CallbackID callback, uint32 param1, uint32 param2, const AirportTileSpec *ats, Station *st, TileIndex tile, int extra_data = 0)
{
AirportTileResolverObject object(ats, tile, st, callback, param1, param2);