1
0
Fork 0
Commit Graph

5 Commits (59904e5f9b2ac5a0d209fd10988e7982de933481)

Author SHA1 Message Date
Peter Nelson 91d22f7617
Codechange: Use EnumBitSet for VehStates. (#13755)
Renamed from VehStatus because pluralising that is weird.
2025-03-08 18:24:21 +00:00
Peter Nelson 810e442203
Codechange: Split GoodsEntry cargo and flows data to unique_ptr. (#13058)
This allows cargo packets and cargo flow data to be empty if not in use, which is the case for the majority of station goods entries, and data is allocated when needed.

This reduces the initial size of a Station from 9192 bytes to 2024 bytes (on 64 bit platforms), although an allocation of 120 bytes is made for each active cargo type at a station.

Based on similar changes in JGRPP.
2025-01-02 20:48:23 +00:00
Peter Nelson f629d3c921
Codechange: Use vectors instead of CallocT/free for cache checks. (#12619)
Vectors are reused for each vehicle chain to save on reallocations.
2024-05-04 09:42:20 +01:00
Peter Nelson 3b75d8bbf8 Fix: Use modern comparisons instead of memcmp in cache check.
This uses C++20 default operator<=> to provide comparisons of some objects.

This works properly with caches that containers.
2024-04-18 22:13:55 +01:00
Peter Nelson 21d11ee361 Codechange: Move cache check function to own file. 2024-04-18 22:13:55 +01:00