summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoan Josep <juanjo.ng.83@gmail.com>2022-01-05 13:25:22 +0100
committerGitHub <noreply@github.com>2022-01-05 12:25:22 +0000
commit54ce5b28a41ec6ab6af9e19aea0f5038a0256371 (patch)
tree7b10a90443bdabeaa1247b3ed2cbf3e958c84f2b
parent5777649ac4d7d398d23291dd54dda60169d01ade (diff)
downloadopenttd-54ce5b28a41ec6ab6af9e19aea0f5038a0256371.tar.xz
Codechange: Make RoadScopeResolver constructor inlineable (#9780)
-rw-r--r--src/newgrf_roadtype.cpp13
-rw-r--r--src/newgrf_roadtype.h12
2 files changed, 11 insertions, 14 deletions
diff --git a/src/newgrf_roadtype.cpp b/src/newgrf_roadtype.cpp
index 8eb8325c7..a0cab4b15 100644
--- a/src/newgrf_roadtype.cpp
+++ b/src/newgrf_roadtype.cpp
@@ -74,19 +74,6 @@ uint32 RoadTypeResolverObject::GetDebugID() const
}
/**
- * Constructor of the roadtype scope resolvers.
- * @param ro Surrounding resolver.
- * @param tile %Tile containing the track. For track on a bridge this is the southern bridgehead.
- * @param context Are we resolving sprites for the upper halftile, or on a bridge?
- */
-RoadTypeScopeResolver::RoadTypeScopeResolver(ResolverObject &ro, const RoadTypeInfo *rti, TileIndex tile, TileContext context) : ScopeResolver(ro)
-{
- this->tile = tile;
- this->context = context;
- this->rti = rti;
-}
-
-/**
* Resolver object for road types.
* @param rti Roadtype. nullptr in NewGRF Inspect window.
* @param tile %Tile containing the track. For track on a bridge this is the southern bridgehead.
diff --git a/src/newgrf_roadtype.h b/src/newgrf_roadtype.h
index 748d62e82..3314db345 100644
--- a/src/newgrf_roadtype.h
+++ b/src/newgrf_roadtype.h
@@ -20,7 +20,17 @@ struct RoadTypeScopeResolver : public ScopeResolver {
TileContext context; ///< Are we resolving sprites for the upper halftile, or on a bridge?
const RoadTypeInfo *rti;
- RoadTypeScopeResolver(ResolverObject &ro, const RoadTypeInfo *rti, TileIndex tile, TileContext context);
+ /**
+ * Constructor of the roadtype scope resolvers.
+ * @param ro Surrounding resolver.
+ * @param rti Associated RoadTypeInfo.
+ * @param tile %Tile containing the track. For track on a bridge this is the southern bridgehead.
+ * @param context Are we resolving sprites for the upper halftile, or on a bridge?
+ */
+ RoadTypeScopeResolver(ResolverObject &ro, const RoadTypeInfo *rti, TileIndex tile, TileContext context)
+ : ScopeResolver(ro), tile(tile), context(context), rti(rti)
+ {
+ }
/* virtual */ uint32 GetRandomBits() const;
/* virtual */ uint32 GetVariable(byte variable, uint32 parameter, bool *available) const;