1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-12 09:09:09 +00:00

(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

@@ -937,21 +937,6 @@ static uint32 VehicleGetVariable(Vehicle *v, const VehicleScopeResolver *object,
return in_motion ? group->loaded[set] : group->loading[set];
}
/**
* Scope resolver of a single vehicle.
* @param ro Surrounding resolver.
* @param engine_type Engine type
* @param v %Vehicle being resolved.
* @param info_view Indicates if the item is being drawn in an info window.
*/
VehicleScopeResolver::VehicleScopeResolver(ResolverObject &ro, EngineID engine_type, const Vehicle *v, bool info_view)
: ScopeResolver(ro)
{
this->v = v;
this->self_type = engine_type;
this->info_view = info_view;
}
/**
* Get the grf file associated with an engine type.
* @param engine_type Engine to query.