Tyler Trahan
735abfe111
Codechange: Split dates and timers into Economy and Calendar time ( #10700 )
2024-01-22 09:04:34 -05:00
Peter Nelson
ab535c0a86
Codechange: Add base() method to StrongType to allow access to the base type without casting. ( #11445 )
...
This removes the ability to explicitly cast to the base type, but the requirement
to use .base() means the conversion is still explicit.
2023-11-06 20:29:35 +00:00
Tyler Trahan
77173a6a10
Codechange: Move date consts and functions to CalendarTime and TimerGameCalendar classes
2023-09-10 08:40:25 -04:00
Patric Stout
299570b2c1
Codechange: make TimerGameCalendar Date and Year types strongly typed ( #10761 )
2023-08-12 18:14:21 +00:00
Patric Stout
a9ed590ca7
Codechange: use TimerGameCalendar::Date for variables in linkgraph that are dates ( #11187 )
2023-08-12 16:02:38 +02:00
Rubidium
eaae0bb5e7
Codechange: automatic adding of _t to (u)int types, and WChar to char32_t
...
for i in `find src -type f|grep -v 3rdparty/fmt|grep -v 3rdparty/catch2|grep -v 3rdparty/opengl|grep -v stdafx.h`; do sed 's/uint16& /uint16 \&/g;s/int8\([ >*),;[]\)/int8_t\1/g;s/int16\([ >*),;[]\)/int16_t\1/g;s/int32\([ >*),;[]\)/int32_t\1/g;s/int64\([ >*),;[]\)/int64_t\1/g;s/ uint32(/ uint32_t(/g;s/_uint8_t/_uint8/;s/Uint8_t/Uint8/;s/ft_int64_t/ft_int64/g;s/uint64$/uint64_t/;s/WChar/char32_t/g;s/char32_t char32_t/char32_t WChar/' -i $i; done
2023-07-19 19:30:14 +02:00
PeterN
57f2d70fef
Change: Use cstdint instead of rolling our own types. ( #10651 )
2023-04-27 10:04:18 +02:00
Tyler Trahan
930f0a16d8
Codechange: Define Date/Year/Month/Day within TimerGameCalendar class
2023-04-26 07:14:03 -04:00
Patric Stout
7aa2b9ab0a
Codechange: move all date-related variables inside the timer ( #10706 )
2023-04-24 15:56:01 +00:00
Michael Lutz
aab580e0ac
Codechange: [Linkgraph] Drop node/edge wrappers from LinkGraph.
2023-02-26 21:41:24 +01:00
Michael Lutz
7352f812e6
Codechange: [Linkgraph] Only store present link graph edges and not all possible edges.
2023-02-26 21:41:24 +01:00
Michael Lutz
fe27db3dfd
Codechange: [Linkgraph] Store edges in each node and not in a global matrix.
2023-02-26 21:41:24 +01:00
Patric Stout
1fb101eabb
Codechange: address CodeQL issue "Multiplication result converted to larger type" ( #10306 )
...
Most are very unlikely to ever be triggered in our codebase; two
stand out: linkgraph and money cheat. Those, potentially, could
wrap earlier than expected.
2023-01-02 20:30:02 +00:00
Nicolas Chappe
c5369caa45
Fix: [Linkgraph] possible rounding errors for travel times of low-capacity links
2022-10-29 18:39:03 +02:00
Nicolas Chappe
de28817d9f
Fix 977604ef: [Linkgraph] Add a special case for unknown travel times on link update
2021-08-18 01:48:11 +02:00
Nicolas Chappe
977604ef08
Feature: [Linkgraph] Prioritize faster routes for passengers, mail and express cargo
...
Passengers usually prefer fast paths to short paths.
Average travel times of links are updated in real-time for use in Dijkstra's algorithm,
and newer travel times weigh more, just like capacities.
2021-08-17 14:57:59 +02:00
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
2021-01-08 11:16:18 +01:00
S. D. Cloudt
13cc8a0cee
Cleanup: Removed SVN headers
2019-11-10 17:59:20 +00:00
PeterN
32fda83d39
Fix aa7ca7fe6: Linkgraph node index order must be maintained due to other references. ( #7431 )
...
Linkgraph nodes require a specific order that was maintained by swapping just the last
element for the node to be removed. std::vector::erase() changed this to removing the
node is then shuffling the remain items down, which upsets other references to this
indices.
This is fixed by switching back to the original swap & pop method.
2019-03-30 22:19:50 +00:00
Henry Wilson
a0f36a50e6
Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()
2019-03-26 20:15:57 +00:00
Henry Wilson
aa7ca7fe64
Codechange: Replaced SmallVector::Get(n) non-const with std::vector::data() + n
2019-03-26 20:15:57 +00:00
Henry Wilson
bad2c2154b
Codechange: Replaced SmallVector::Resize() with std::vector::resize()
2019-03-26 20:15:57 +00:00
Charles Pigott
f5b1115039
Doc: Lots and lots of doxymentation fixes
2018-10-31 12:35:54 +01:00
fonsinchen
957f5ca117
(svn r26646) -Fix [FS#6041]: Save locations instead of distances in link graphs to reduce size.
2014-06-14 13:35:39 +00:00
rubidium
89c25b955e
(svn r26580) -Codechange: s/GES_PICKUP/GES_RATING/ (it has nothing to do with actual pickup), s/acceptance_pickup/status/ (the enum isn't called GoodEntryStatus for a reason; it's not only acceptance and pickup anymore)
2014-05-11 18:02:11 +00:00
fonsinchen
11d98f043e
(svn r26549) -Change: better estimation for link capacities during full load
2014-05-01 14:50:52 +00:00
rubidium
0463dbdc9e
(svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values
2014-04-23 20:13:33 +00:00
fonsinchen
afd1263ce1
(svn r26411) -Change [FS#5941]: Use better distance metric for link graph (MildaIV)
2014-03-17 20:33:26 +00:00
fonsinchen
5d3fcce725
(svn r26393) -Fix: Update distances between link graph nodes when station sign is moved
2014-03-06 21:19:41 +00:00
fonsinchen
29e987f3fc
(svn r25898) -Codechange: Add second timestamp for 'restricted links' to all edges.
2013-10-22 16:13:28 +00:00
rubidium
0fbc7140c5
(svn r25320) -Fix [FS#5577]: link graph start time was not accounted for when cheating dates
2013-06-04 15:06:22 +00:00
rubidium
06313e4981
(svn r25257) -Add: basic link graph (fonsinchen)
2013-05-19 14:11:20 +00:00