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_engine.h | |
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_engine.h')
-rw-r--r-- | src/newgrf_engine.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/newgrf_engine.h b/src/newgrf_engine.h index 6406b0f4e..51adb0b7f 100644 --- a/src/newgrf_engine.h +++ b/src/newgrf_engine.h @@ -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; } |