Peter Nelson and GitHub
5008568dfc
Codechange: Rename CenterBounds to CentreBounds and move to geometry header. ( #14002 )
2025-04-14 23:55:40 +01:00
Peter Nelson and Peter Nelson
8275bbfb87
Codechange: Pass Viewport by reference.
...
This means we do not have to care what type of pointer is used.
2025-04-09 22:03:23 +01:00
Peter Nelson and GitHub
33a8c1c6fc
Codechange: Use default operator<=> to compare Linkgraph Hop. ( #13944 )
2025-04-02 23:00:06 +01:00
Peter Nelson and GitHub
e200e9b401
Codechange: Use EnumBitSet for Linkgraph RefreshFlags. ( #13930 )
2025-03-31 20:33:32 +01:00
Peter Nelson and GitHub
325f7f9767
Codechange: Use EnumBitSet for GoodsEntry status. ( #13899 )
2025-03-26 21:22:33 +00:00
Peter Nelson and GitHub
b96b26ef15
Codechange: Rename short CargoType parameters cargo. ( #13848 )
...
Rename CargoType variables and parameters using short or meaningless names.
2025-03-24 18:18:21 +00:00
Peter Nelson and GitHub
bd5d47836d
Codechange: Use EnumBitSet for EdgeUpdateMode. ( #13808 )
2025-03-14 09:01:10 +00:00
Rubidium and rubidium42
754311a779
Codechange: use std::move when appropriate
2025-03-13 13:00:24 +01:00
Rubidium and rubidium42
2000cea235
Codechange: initialise instance members
2025-03-09 20:41:03 +01:00
Peter Nelson and Peter Nelson
edf9f597ec
Codechange: Use parameterised GetString() for remaining windows.
2025-03-02 07:29:25 +00:00
Rubidium and rubidium42
f69968f2bc
Codechange: explicitly initialise member variables of Windows
2025-02-27 12:21:06 +01:00
Rubidium and rubidium42
6eb2dec338
Codechange: explicitly initialise LinkGraph and LinkGraphJob member variables
2025-02-18 18:41:31 +01:00
Rubidium and rubidium42
fd4adc55e3
Codechange: replace INVALID_X with XID::Invalid() for PoolIDs
2025-02-16 20:23:00 +01:00
Rubidium and rubidium42
af00b835a1
Codechange: remove transitional supports from the pool
2025-02-16 19:31:37 +01:00
Rubidium and rubidium42
59df0ff496
Codechange: strongly type StationID
2025-02-16 18:25:51 +01:00
Rubidium and rubidium42
1ffc950e22
Codechange: use prefix operator++ for CompanyID iterations
2025-02-16 14:02:18 +01:00
Peter Nelson and GitHub
6cf7a899e9
Codechange: Use EnumBitSet for PauseMode. ( #13553 )
2025-02-14 08:30:04 +00:00
Peter Nelson and GitHub
20e57a02a2
Codechange: Use GetString() with argument parameters in simple cases. ( #13551 )
...
Avoids using global string parameters.
2025-02-14 00:10:56 +00:00
Peter Nelson and Peter Nelson
2cb9f55183
Codechange: Store EncodedString for tooltip text.
...
This replaces capturing and storing string parameters.
2025-02-10 22:49:14 +00:00
Rubidium and rubidium42
ec492cb267
Codechange: make CompanyMask a BaseBitSet implementation
2025-02-09 19:24:51 +01:00
Rubidium and rubidium42
c311e6e4a9
Codechange: strongly type LinkGraphID and LinkGraphJobID
2025-02-09 15:07:29 +01:00
Peter Nelson and GitHub
d61b376998
Codechange: Use EnumBitSet for CargoClasses. ( #13491 )
2025-02-08 08:46:38 +00:00
Rubidium and rubidium42
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 and Peter Nelson
28eb5e05c8
Codechange: Use EnumBitSet for NWidContainerFlags.
2025-02-06 19:43:35 +00:00
Peter Nelson and Peter Nelson
d30e8dd1c1
Codechange: Use EnumBitSet for WindowDefaultFlags.
2025-01-30 08:40:42 +00:00
Peter Nelson and GitHub
afc0745aa2
Codechange: Specify underlying type for all enums excluding those exposed to scripts. ( #13383 )
2025-01-28 22:17:34 +00:00
Rubidium and rubidium42
e894a5880c
Codechange: rename CargoID to CargoType and amend related variables/comments
2025-01-26 18:07:10 +01:00
Peter Nelson and GitHub
b653f875b0
Codechange: Space between template and < ( #13278 )
...
Make it all consistent so it matches CODINGSTYLE.
2025-01-04 17:56:14 +00:00
Rubidium and rubidium42
ef87acc1ff
Codechange: make STR_NULL the default for all widget construction functions
2025-01-03 23:25:27 +01:00
Rubidium and rubidium42
4bf36e3fa6
Codechange: replace SetDataTip(STR_ with SetStringTip(STR_
2025-01-02 23:28:43 +01:00
Peter Nelson and GitHub
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
Rubidium and rubidium42
c0df898ac5
Codechange: do not implicitly convert during assignment to StrongType
2025-01-01 21:32:51 +01:00
Rubidium and rubidium42
3956ed086a
Codechange: use Date/Year constructor explicitly
2025-01-01 16:25:32 +01:00
Rubidium and rubidium42
58ba8c122b
Codechange: use constructor instead of assignment for date/year constants
2025-01-01 00:10:35 +01:00
Peter Nelson and GitHub
eacec144b0
Fix 56510b5d7b: CargoArray does need to be initialised... ( #13168 )
2024-12-12 19:33:55 +00:00
Peter Nelson and GitHub
56510b5d7b
Codechange: Use CargoArray for linkgraph refresher. ( #13165 )
...
`uint capacities[NUM_CARGO]` looks a lot like CargoArray.
2024-12-11 19:24:58 +00:00
Peter Nelson and Peter Nelson
fa1849b855
Codechange: Use std::range::find_if where possible.
2024-11-24 10:36:03 +00:00
Peter Nelson and GitHub
e1697a6ad1
Codechange: Don't use enums for non-enumerated values. ( #13031 )
...
In the past we have used enums to hold an arbitrary values. These values
are not enumerated types, so make them constants instead.
2024-10-27 18:02:49 +00:00
Peter Nelson and GitHub
d5b57a56f4
Codechange: Use std::unique_ptr for link graph schedule handlers. ( #12988 )
...
This removes manual memory management.
2024-10-15 02:11:06 +01:00
Peter Nelson and GitHub
14b986609b
Add: AppendStringInPlace() to append translated string ID into an existing string. ( #12969 )
...
This allows avoiding a string copy when building strings.
2024-10-07 19:05:38 +01:00
Jonathan G Rennison and rubidium42
4070cf9968
Codefix: LinkGraphOverlay::dirty was never initialised
2024-08-24 21:06:33 +02:00
Peter Nelson and GitHub
55314513ce
Codechange: Pass NWidgetParts as span instead of begin/end pointers. ( #12779 )
2024-06-12 23:08:35 +01:00
Peter Nelson and GitHub
4cf6d1dd79
Codechange: Pass WindowDesc by reference instead of pointer. ( #12771 )
...
WindowDesc as passed to Windows is not optional so don't allow to it to be nullptr.
2024-06-11 08:58:03 +01:00
Jonathan G Rennison and rubidium42
9647fe1d05
Change: [Linkgraph] Improve distance scaling algorithm in demand scaler
...
Improve scaling at values other than 0% and 100%
Fix erratic scaling and increase effect size at large setting values
2024-05-01 22:40:17 +02:00
Peter Nelson and Peter Nelson
40fa45a76a
Codechange: Emplace std::pair into vectors.
...
This creates the pair in the vector, instead of creating it then copying it in.
2024-04-20 10:25:20 +01:00
Rubidium and rubidium42
4f2412a272
Codechange: range based for loops instead of C-style for loops
2024-04-11 07:05:04 +02:00
Peter Nelson and GitHub
de4e00c93f
Codechange: Pass by reference to UpdateWidgetSize. ( #12457 )
...
These parameters are always provided and not optional.
2024-04-09 08:34:45 +01:00
Patric Stout and GitHub
a3cfd23cf9
Codechange: rename byte to uint8_t ( #12308 )
2024-03-16 23:59:32 +01:00
Rubidium and rubidium42
86cb184eb4
Codechange: use std::source_location over __FILE__ and __LINE__ for WindowDesc
2024-03-10 10:14:20 +01:00
Peter Nelson and Peter Nelson
912d7bd80e
Codechange: Give ColourShade values names instead of numbers.
2024-02-25 12:38:07 +00:00