Commit Graph

18 Commits

Author SHA1 Message Date
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
Rubidium 7e1d272397 Cleanup: remove unused static variables 2023-01-27 07:05:49 +01:00
glx22 2c941cd8b3 Codechange: Use ChunkHandlers sub-classes 2021-07-06 22:29:08 +02:00
Patric Stout 9fff00ba20
Codechange: C++-ify lists for SaveLoad (#9323)
Basically, this changes "SaveLoad *" to either:
1) "SaveLoadTable" if a list of SaveLoads was meant
2) "SaveLoad &" if a single entry was meant

As added bonus, this removes SL_END / SLE_END / SLEG_END. This
also adds core/span.hpp, a "std::span"-lite.
2021-05-31 22:26:44 +02:00
glx 9892d90b26 Codechange: Replace order related FOR_ALL with range-based for loops 2019-12-21 20:13:03 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Samu 9b99b95955 Fix #6574: Remove go to hangar orders when rebuilding airport
When replacing an airport with another, cancel current orders of type 'go to depot' from aircraft still heading to it if the rebuilt airport doesn't have a hangar (helicopter vs heliport), or if the airplane can't land on the rebuilt airport (airplane vs helistation).

Removes 'go to hangar' orders from all aircraft when replacing an airport with hangar with another without hangar (heliport).
2019-02-27 00:06:57 +01:00
frosch 5ce1971588 (svn r24444) -Codechange: Base OrderBackup on BaseConsist. 2012-07-29 16:45:34 +00:00
rubidium d9b9ac6013 (svn r23464) -Fix [FS#4876]: clear the backed up orders of a removed station as well, otherwise one could create orders to a station that was never in the original backupped orders. For example a road vehicle trying to go to a buoy. 2011-12-09 20:48:13 +00:00
rubidium 4d5dbf5170 (svn r22410) -Document: some more bits ;) 2011-05-02 16:14:23 +00:00
rubidium 9ca4b629cd (svn r21846) -Codechange: move documentation towards the code to make it more likely to be updated [o-s]. 2011-01-18 23:09:43 +00:00
rubidium 30f2afac9b (svn r20632) -Cleanup: remove "a few" unneeded includes, and add them to some headers 2010-08-26 22:01:16 +00:00
rubidium da4dc61f76 (svn r20603) -Codechange: silence some ICC warnings 2010-08-23 22:03:36 +00:00
rubidium 1fd36a0f32 (svn r20593) -Fix: (rlongago, r20547): long ago the service interval was int16, after which is got converted to Date except in the order backup. Much later I copied the savegame snippets from a vehicle and applied that on the order backup. Presto, reading/writing 32 bits (of Date) into 16 bits of ancient style service interval. That would then "spoil" the name pointer and that eventually crashes OpenTTD as it's likely to be an invalid pointer. 2010-08-22 16:47:26 +00:00
rubidium 926594b599 (svn r20547) -Change: the way order backups are performed. Now restoring an order doesn't require up to 765 commands. 2010-08-18 20:48:38 +00:00
rubidium 019878118d (svn r20545) -Codechange: make sure an OrderBackup gets cleared when the depot it belongs to gets removed, the depot window gets closed or when another vehicle gets sold in a depot 2010-08-18 18:52:16 +00:00
rubidium 287ee8c01d (svn r20541) -Fix: when removing a vehicle update the "clone orders of"-vehicle of a backed up order, or remove it if there is no vehicle sharing orders with that vehicle. 2010-08-18 15:58:30 +00:00
rubidium 38ca44594f (svn r20539) -Codechange: make order backups more self-contained. 2010-08-18 15:15:59 +00:00