Codechange: Use variable storage for GrfProps with cargo-type groups. (#13557)

Slots are only allocated when used instead of being reserved.

Array-based GrfProps are still used when the number of options is more limited.
This commit is contained in:
Peter Nelson
2025-02-14 18:30:17 +00:00
committed by GitHub
parent 4fe3f0ccdd
commit ff7eb996e6
21 changed files with 126 additions and 56 deletions
+1 -1
View File
@@ -80,7 +80,7 @@ struct Engine : EnginePool::PoolItem<&_engine_pool> {
* Used for obtaining the sprite offset of custom sprites, and for
* evaluating callbacks.
*/
GRFFilePropsBase<NUM_CARGO + 2> grf_prop;
VariableGRFFileProps grf_prop;
std::vector<WagonOverride> overrides;
Engine() {}