Commit Graph

57477 Commits

Author SHA1 Message Date
Jonathan G Rennison
615c42d357 Reserve vector size when loading station flow stats 2023-08-19 18:15:34 +01:00
Jonathan G Rennison
0f9f1f4280 Use btree map for _town_test_ratings 2023-08-19 18:15:34 +01:00
Jonathan G Rennison
2bc943d31a Avoid std::set in script version checks 2023-08-19 18:15:34 +01:00
Jonathan G Rennison
1979fa9db1 Use btree set for _changed_storage_arrays 2023-08-19 18:15:34 +01:00
Jonathan G Rennison
53ef4536d9 Departures: Use btree map for scheduled dispatch maps 2023-08-19 18:15:34 +01:00
Jonathan G Rennison
66b5c615b7 Use btree map for GRF ID overrides 2023-08-19 18:15:34 +01:00
Jonathan G Rennison
e912cfc19d Ring buffer: Use as backing for std::queue uses 2023-08-19 15:28:45 +01:00
Jonathan G Rennison
2296b92ea2 Use btree map for StationCargoAmountMap 2023-08-19 14:24:06 +01:00
Jonathan G Rennison
23ad010d70 Replace remaining uses of std::deque with ring buffers
Cargo packet lists and associated save/load
2023-08-19 14:01:06 +01:00
Jonathan G Rennison
b59a8dc21c Ring buffer: Don't apply const when dereferencing iterators 2023-08-19 13:54:52 +01:00
Jonathan G Rennison
0c634edef5 Ring buffer: Add erase 2023-08-19 13:47:14 +01:00
Jonathan G Rennison
877e301c5a Ring buffer: Add multi-value insert 2023-08-19 13:04:48 +01:00
Jonathan G Rennison
bdfdb9808a Ring buffer: Add iterator conversions 2023-08-19 12:25:15 +01:00
Jonathan G Rennison
8d2911fe29 Ring buffer: Add swap function, make move (swap) assignment noexcept 2023-08-19 12:16:33 +01:00
Jonathan G Rennison
ab128143fb Ring buffer: Make iterator default constructor public 2023-08-19 12:09:09 +01:00
Jonathan G Rennison
8d3a90425c Test: Add tests for ring buffer functionality 2023-08-19 11:44:58 +01:00
Jonathan G Rennison
3f2b06fcbe Ring buffer: Fix various insert/emplace cases 2023-08-19 11:41:29 +01:00
Jonathan G Rennison
6b8994c947 Ring buffer: Fix iterator operator + and - 2023-08-19 11:41:11 +01:00
Jonathan G Rennison
21adf399c0 Ring buffer: Add a std::initializer_list constructor 2023-08-19 11:32:49 +01:00
Rubidium
73d7052732 Add: unit test functionality using catch2
(cherry picked from commit 43a7e54067)
2023-08-19 10:18:31 +01:00
Rubidium
f92a96dad2 Add: catch2 v2.13.10
(cherry picked from commit 88ead3f102)
2023-08-19 10:18:31 +01:00
Jonathan G Rennison
5a28405ced Merge branch 'master' into jgrpp
# Conflicts:
#	src/company_gui.cpp
#	src/group_gui.cpp
#	src/newgrf.cpp
#	src/newgrf_debug_gui.cpp
#	src/saveload/saveload.cpp
2023-08-19 01:28:36 +01:00
Jonathan G Rennison
ef168b7d46 Fix: Road stops should not draw a ground sprite of 0 2023-08-19 00:18:25 +01:00
Patric Stout
cd10ddf9ae Remove: last remnants of SunOS (#11210)
We have no evidence SunOS has been tried in the last few years,
and the code is awkward enough to just remove.
2023-08-19 00:52:58 +02:00
Patric Stout
53af20910b Fix: [MSVC] generate static libraries / executables correctly with vcpkg -static target (#11208) 2023-08-19 00:43:32 +02:00
Jonathan G Rennison
aee13946ff Fix: Inaccurate waiting cargo total in station window when using cargodist
For stations with many flows and/or small cargo packets,
due to accumulated inaccuracies in DivideApprox.

The displayed total should match GoodsEntry::TotalCount().
2023-08-18 23:35:11 +01:00
Jonathan G Rennison
c7712bbd20 Debug: Shpw station GoodsEntry info in station debug window 2023-08-18 23:13:30 +01:00
Patric Stout
66b324a4c0 Fix: [MacOS] screen looks blue-ish when using newer SDKs (#11207)
The define kCGBitmapByteOrder32Host changed (around SDK 12?)
into an enum, which means an old #ifndef was triggering,
overwriting the value to 0. Sadly, 0 means Order16Big, causing
RGBA to become GRAB, which results in strange colours.

As we no longer support PPC, drop that piece of code completely.

(cherry picked from commit 5ac333c2cc)
2023-08-18 21:27:43 +01:00
Loïc Guilloux
c890f96d07 Fix: no fast forward in network was ensured only from GUI side (#11206)
(cherry picked from commit 2bf3c02fbf)
2023-08-18 21:27:33 +01:00
Jonathan G Rennison
175f6c979c Use ring buffer for network TCP packet send queue 2023-08-18 21:25:36 +01:00
Jonathan G Rennison
cf655f624b Remove unused include 2023-08-18 21:25:36 +01:00
Jonathan G Rennison
7502fbd44b Use ring buffers for tile/landscape candidate queues 2023-08-18 21:25:36 +01:00
Jonathan G Rennison
69683eecb8 Use ring buffer for console buffer 2023-08-18 21:25:36 +01:00
Jonathan G Rennison
a403a0c8e3 Use ring buffer for script log line data 2023-08-18 21:25:36 +01:00
Jonathan G Rennison
7fb815aad8 Use ring buffer in TCPConnecter::OnResolved 2023-08-18 21:25:36 +01:00
Jonathan G Rennison
8c1a3c26af Use ring buffers for network _chatmsg_list and _command_queue 2023-08-18 21:25:36 +01:00
Jonathan G Rennison
e958bdde9f Use ring buffers for train lookahead items and curves 2023-08-18 21:25:36 +01:00
Jonathan G Rennison
ebd375c247 Container: Add a self-resizing ring buffer container 2023-08-18 21:25:36 +01:00
translators
7f5c0aab60 Update: Translations from eints
dutch: 2 changes by Afoklala
2023-08-18 18:38:21 +00:00
Jonathan G Rennison
87911bdf47 Use bitmath builtins for FindLastBit 2023-08-18 13:38:39 +01:00
Jonathan G Rennison
c49651ae7b VarAction2: Use reserve and shrink_to_fit for DSG adjusts vector 2023-08-18 13:22:22 +01:00
Jonathan G Rennison
129691dcc7 Music: Defer probing for music driver until a music set is loaded 2023-08-18 13:22:22 +01:00
Jonathan G Rennison
8681f29155 Linux: Try to enable transparent huge pages for map allocation
Using single allocation for tile and tile-extended
2023-08-18 13:22:22 +01:00
Jonathan G Rennison
41fed27d0a Animated tile: Prefetch next item in map 2023-08-18 13:22:22 +01:00
Patric Stout
5ac333c2cc Fix: [MacOS] screen looks blue-ish when using newer SDKs (#11207)
The define kCGBitmapByteOrder32Host changed (around SDK 12?)
into an enum, which means an old #ifndef was triggering,
overwriting the value to 0. Sadly, 0 means Order16Big, causing
RGBA to become GRAB, which results in strange colours.

As we no longer support PPC, drop that piece of code completely.
2023-08-18 13:22:00 +02:00
Loïc Guilloux
2bf3c02fbf Fix: no fast forward in network was ensured only from GUI side (#11206) 2023-08-17 21:14:39 +02:00
translators
e8c49d3543 Update: Translations from eints
swedish: 1 change by joeax910
2023-08-17 18:38:20 +00:00
Jonathan G Rennison
2212191b6c Saveload: Fix missing cast warnings for ship/RV path cache load 2023-08-17 15:17:54 +01:00
Jonathan G Rennison
9cf39b7a25 Prefetch next tile in tile loop iteration 2023-08-17 14:40:39 +01:00
Jonathan G Rennison
cc57ac0eff Add pre-check to auxiliary tile loop flooding test 2023-08-17 14:40:07 +01:00