frosch
61cec33be2
Codechange: Add 'const' to static variables, which are only initialised once.
2025-05-06 18:29:41 +02:00
frosch
9cf36dac39
Codechange: Use data() instead of c_str(), if no NUL termination is needed.
2025-04-30 19:33:56 +02:00
frosch
afe3dfb3a4
Codechange: Use format instead of to_string.
2025-04-29 20:26:23 +02:00
Rubidium
78250c3bba
Codechange: remove const char* overloads when there are std::string_view and std::string& overloads
2025-04-29 10:14:53 +02:00
frosch
1ea1dbd19e
Add: [NewGRF] Station/roadstop animation-triggers 'tile loop' (bit 7) and 'path reservation' (bit 8). ( #14080 )
2025-04-26 14:44:55 +02:00
frosch
880a947eb3
Fix: [NewGRF] Randomisation-trigger 'path reservation' did not work for waypoints.
2025-04-24 09:19:43 +02:00
frosch
bc0eaf9ac4
Codechange: Allow passing waypoints to Trigger(Station|RoadStop)Randomisation.
2025-04-24 09:19:43 +02:00
Peter Nelson
6d5aee0545
Codechange: Restructure RoadStop Entries to reduce pointers. ( #14069 )
...
A RoadStop must own both west and east `Entry`s, but they are allocated separately.
Combine this allocation into one instead.
2025-04-23 08:29:34 +01:00
frosch
2bee313642
Codechange: Replace FindVehicleOnPos with 'for' loop.
2025-04-22 22:12:59 +02:00
frosch
dacd77b2bd
Codechange: Use FindVehicleOnPos instead of HasVehicleOnPos, if there is no stop condition.
2025-04-22 22:12:59 +02:00
frosch
61a0a520f6
Codechange: Unify random trigger enums and turn them into enum classes. ( #14066 )
2025-04-21 20:03:34 +02:00
frosch
461b73e21b
Codefix: stdafx.h and safeguards.h should be the first and last include in every source file, and not appear in any header file.
2025-04-20 22:06:18 +02:00
frosch
43ea6c9b88
Codechange: Turn AyStar into an actual class with virtual methods instead of function pointers.
2025-04-19 00:24:15 +02:00
frosch
97ead8e241
Codechange: Remove unused options from AyStar.
2025-04-19 00:24:15 +02:00
Peter Nelson
2c59838acb
Codechange: (re)set multiple bitset flags in one call. ( #14017 )
2025-04-18 14:07:57 +01:00
Peter Nelson
936d78fefc
Codefix: Avoid uppercase characters in variable names. ( #13985 )
2025-04-10 07:19:27 +01:00
frosch
04246c530f
Codechange: Use fmt::format instead of stringstream with iomanip flags. ( #13964 )
2025-04-08 20:57:50 +00:00
Peter Nelson
47d078c033
Codechange: Use EnumBitSet for RailTypes.
2025-03-25 20:15:48 +00:00
Peter Nelson
732109e444
Codechange: Use EnumBitSet for RoadTypes.
2025-03-25 20:15:48 +00:00
Peter Nelson
89948b941b
Codechange: Use emplace_back instead of push_back. ( #13855 )
2025-03-20 17:39:10 +00:00
Charles Pigott
bcabc3b780
Codechange: Upgrade fmt to 11.1.4 ( #13807 )
2025-03-13 21:52:47 +00:00
Rubidium
02f1bc0880
Codefix: remove some logically dead code
2025-03-12 22:00:33 +01:00
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
Rubidium
fd4adc55e3
Codechange: replace INVALID_X with XID::Invalid() for PoolIDs
2025-02-16 20:23:00 +01:00
Jonathan G Rennison
d06b371254
Cleanup: Fix various spelling errors
2025-02-12 22:44:51 +01:00
Peter Nelson
1ed685b5c1
Codechange: Use EnumBitSet.Any(). ( #13512 )
2025-02-09 20:16:16 +00:00
Patric Stout
86841ba1f0
Codechange: no longer add "src" to the include-path ( #13511 )
2025-02-09 19:43:15 +00:00
Rubidium
04d53ed6f5
Codechange: remove operator!=s that are synthesized
2025-02-08 06:37:36 +01:00
Peter Nelson
11bfd5bb9e
Codechange: Use EnumBitSet for EndSegmentReasons. ( #13490 )
2025-02-07 23:53:23 +00:00
Rubidium
e937c4dcfd
Codechange: change DestinationID into class with conversion helpers
...
A DestinationID is either a DepotID or StationID, where the aircraft hangar
being conceptually a depot is actually a StationID. When making those types
stronger, a lot of casts would need to be added, but this shows the intent
much better.
2025-02-06 21:03:24 +01:00
Peter Nelson
afc0745aa2
Codechange: Specify underlying type for all enums excluding those exposed to scripts. ( #13383 )
2025-01-28 22:17:34 +00:00
Peter Nelson
4397aa3909
Codechange: Make StationType an enum class. ( #13339 )
2025-01-19 20:53:08 +00:00
SamuXarick
4018179d7b
Cleanup: Remove unused includes and function ( #13321 )
2025-01-15 14:50:14 +01:00
SamuXarick
ee860a5c8e
Doc: Update some yapf inline comments
2024-12-24 20:43:46 +01:00
SamuXarick
de908e08b2
Codefix: Remove duplicated include
2024-12-22 14:01:40 +01:00
Koen Bussemaker
701cb2e9d7
Codechange: Move two way signal EOL to a more logical place
2024-12-06 09:27:32 +01:00
Peter Nelson
61cbdef92d
Codechange: Make AyStarStatus an enum class. ( #13129 )
...
This enforces type-safety.
2024-11-30 14:23:32 +00:00
SamuXarick
cf7710fb61
Codechange 8e9603b
: Replace int32_t with AyStarStatus ( #13127 )
2024-11-27 23:26:07 +00:00
SamuXarick
8e9603bd33
Codechange: Rename and return AyStarStatus instead of int ( #13125 )
...
- Rename enum AystarStatus to AyStarStatus.
- Return AyStarStatus instead of int for AyStar::Main and AyStar::Loop functions.
2024-11-27 00:10:06 +01:00
Peter Nelson
3be0166801
Codechange: Use std::ranges::find where possible.
...
Replace `std::find(range.begin(), range.end(), ...)` with `std::ranges::find(range, ...)`.
2024-11-24 10:36:03 +00:00
Peter Nelson
c39810ff6a
Codechange: Replace path cache queues with vectors.
...
Ship and RoadVehicle path caches use a std::deque, which is quite memory hungry, especially for RoadVehicle which has two.
std::deque was used to be able to push/pop from either end.
Change to use a single std::vector each, which is now push/popped from the back.
2024-11-18 08:59:41 +00:00
Peter Nelson
04b6dfae48
Cleanup: Remove now-unneeded includes from yapf. ( #13088 )
2024-11-16 23:23:06 +00:00
Jonathan G Rennison
71ea58c6de
Codechange: Remove unused CYapfDestinationTileT ( #13086 )
2024-11-16 16:12:18 +00:00
Koen Bussemaker
6faf4fa70a
Codechange: Simplified YAPF ship region node
2024-11-12 23:17:56 +01:00
Koen Bussemaker
3e195df3c7
Codechange: Cleaned up and renamed NodeList
2024-11-12 21:06:17 +01:00
Jonathan G Rennison
883be19865
Codefix a6f412c6
: Missing this-> in YAPF
2024-10-29 19:07:14 +01:00
Koen Bussemaker
0200bc3720
Codechange: Renamed CHashTableT to HashTable and corrected code style
2024-10-29 08:35:47 +01:00
SamuXarick
a96a83e330
Codechange: Code style issues in water regions ( #13019 )
2024-10-28 10:29:26 -04:00
Peter Nelson
e50c1774fc
Codechange: Remove some unnecessary local variables.
2024-10-25 19:01:39 +01:00
Peter Nelson
c39554a210
Codechange: Simplify selection between pathfinder functions.
2024-10-25 19:01:39 +01:00