(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 2a3d0cea50
commit 29dca1be3b
23 changed files with 145 additions and 220 deletions

View File

@@ -26,7 +26,17 @@ struct VehicleScopeResolver : public ScopeResolver {
EngineID self_type; ///< Type of the vehicle.
bool info_view; ///< Indicates if the item is being drawn in an info window.
VehicleScopeResolver(ResolverObject &ro, EngineID engine_type, const Vehicle *v, bool info_view);
/**
* 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(ResolverObject &ro, EngineID engine_type, const Vehicle *v, bool info_view)
: ScopeResolver(ro), v(v), self_type(engine_type), info_view(info_view)
{
}
void SetVehicle(const Vehicle *v) { this->v = v; }