(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

@@ -128,21 +128,6 @@ bool NewGRFClass<Tspec, Tid, Tmax>::IsUIAvailable(uint index) const
INSTANTIATE_NEWGRF_CLASS_METHODS(ObjectClass, ObjectSpec, ObjectClassID, OBJECT_CLASS_MAX)
/**
* Constructor of an object scope resolver.
* @param ro Surrounding resolver.
* @param obj Object being resolved.
* @param tile %Tile of the object.
* @param view View of the object.
*/
ObjectScopeResolver::ObjectScopeResolver(ResolverObject &ro, Object *obj, TileIndex tile, uint8 view)
: ScopeResolver(ro)
{
this->obj = obj;
this->tile = tile;
this->view = view;
}
/* virtual */ uint32 ObjectScopeResolver::GetRandomBits() const
{
return IsValidTile(this->tile) && IsTileType(this->tile, MP_OBJECT) ? GetObjectRandomBits(this->tile) : 0;