Commit Graph

71 Commits

Author SHA1 Message Date
frosch
b6c8f301be Codechange: Silence warnings about intentionally unused parameters. 2023-09-19 22:49:59 +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
Andrii
f26de0d2f9
Fix #10982: No help text for gamelog command (#10984) 2023-06-13 08:33:33 +00:00
Rubidium
617cacd542 Fix #10961, 52a7c69: incorrect order of parameters to gamelog revision constructor 2023-06-06 20:26:26 +02:00
Peter Nelson
6b87fe6540 Codechange: Use std::array for GRF(File|Config) parameters.
This simplifies comparison, copying and assignment operations.
2023-05-19 16:53:56 +01:00
Rubidium
acec34a0fe Cleanup: remove MD5SumToString in lieu of FormatArrayAsHex 2023-05-19 11:24:44 +02:00
Rubidium
d9a04ba446 Codechange: make the MD5 hash/digest/checksum variables a std::array 2023-05-19 11:24:44 +02:00
Peter Nelson
c38df2d589 Codechange: Use std::map instead of custom SmallMap. 2023-05-18 12:18:30 +01:00
Peter Nelson
83f2ad500e Codechange: stdarg.h include not needed as cstdarg is included. 2023-05-17 10:14:41 +01:00
Rubidium
52a7c69974 Codechange: rework Gamelog changes from union to classes 2023-05-16 18:32:52 +02:00
Rubidium
a312a6c1b2 Codechange: make md5sumToString std::string compatible 2023-05-04 23:23:32 +02:00
Rubidium
51c6b8c1e4 Codechange: use fmt::format_to for gamelog message creation over seprintf 2023-05-04 23:23:32 +02:00
Tyler Trahan
6501f84b4a
Codechange: Move calendar date functions inside TimerGameCalendar (#10753) 2023-05-04 13:14:12 +00:00
Peter Nelson
39eff18754 Codechange: Use std::vector for gamelog GRFConfig comparisons. 2023-05-02 19:47:55 +01:00
Peter Nelson
00bf42353a Codechange: Place gamelog into its own class, along with internal data.
Data is now stored in vectors to avoid manual memory management and
passing lengths around.
2023-05-02 19:47:55 +01:00
Patric Stout
31ad990831
Codechange: move tick-counter into TimerGameTick (#10712) 2023-04-24 16:55:40 +00:00
Tyler Trahan
066ae6f3fb Codechange: Simplify some CodeQL-flagged trivial switches 2023-03-25 18:03:16 -04:00
Rubidium
a409e4b026 Add: documention to large functions that have too little documentation according to CodeQL 2023-02-25 23:57:36 +01:00
Rubidium
d51d08ddcb Codechange: put stack variables in global variables for gamelog/crashlog 2023-01-28 17:23:30 +01:00
rubidium42
55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 2021-06-13 12:45:45 +02:00
rubidium42
bf500c39c9 Codechange: make the name of SettingDesc a std::string 2021-06-13 10:26:58 +02:00
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants (#8502) 2021-01-08 11:16:18 +01:00
Charles Pigott
860c270c73 Codechange: Replace assert_compile macro with static_assert 2020-12-27 10:55:42 +00:00
glx
0ed00ae111 Fix: Stop any gamelog action when recovering from SlError() 2020-05-10 20:02:55 +01:00
S. D. Cloudt
13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
Henry Wilson
7c8e7c6b6e Codechange: Use null pointer literal instead of the NULL macro 2019-04-10 23:22:20 +02:00
Henry Wilson
4b349c0f90 Codechange: [core] Implement SmallVector using std::vector
The public and protected interface to SmallVector are unchanged
SmallVector now requires that items be default constructible
This isn't an issue since some contained items were previously created
uninitialized.

Temporary default constructors are added to the following structs
- SmallPair
- SmallStackItem
- GRFPresence

Where vector<bool> is required, transition immediately to std::vector
to avoid returning proxy object references.
2019-03-26 20:15:57 +00:00
Niels Martin Hansen
cd757ecbf4 Change: Use git revision hash (with "modified" prefix) for gamelog 2019-02-03 18:00:16 +01:00
Peter Nelson
0f37a683a2 Codechange: Additional type safety for saveload version variables. 2019-02-02 21:39:06 +00:00
Charles Pigott
f5b1115039 Doc: Lots and lots of doxymentation fixes 2018-10-31 12:35:54 +01:00
rubidium
9ed12b0f07 (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 2014-04-25 15:40:32 +00:00
rubidium
4227f495c5 (svn r26508) -Codechange: use seprintf instead of a custom vstrcatprintf hybrid 2014-04-25 15:25:59 +00:00
rubidium
5b82822c12 (svn r26486) -Codechange: replace a number of snprintfs with seprintf 2014-04-23 21:12:09 +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
smatz
eb015cbfb6 (svn r23901) -Fix: memory leak everytime one clicked a savegame in the load GUI 2012-02-05 15:51:13 +00:00
yexo
433f74edd9 (svn r23065) -Add: -q option to read a savegame, write some general info and exit 2011-10-30 13:47:45 +00:00
rubidium
fb5ecb9499 (svn r22411) -Document: another bunch of bits 2011-05-02 17:42:12 +00:00
rubidium
7eba2bf4d3 (svn r21890) -Cleanup: remove some unneeded includes 2011-01-22 14:52:20 +00:00
frosch
3972c790c2 (svn r20957) -Codechange: Add another parameter to FindGRFConfig() to define search restrictions. 2010-10-17 12:12:13 +00:00
frosch
6063bbf321 (svn r20955) -Fix (r20952): Suppress bogus inconsistencies for games saved while Grfs were missing. 2010-10-16 22:46:53 +00:00
frosch
375be9a073 (svn r20954) -Codechange (r20952, r20953): Don't make stuff more complicated than needed. 2010-10-16 22:34:43 +00:00
frosch
aa688689b1 (svn r20953) -Add: Resolve Grf filenames from the gamelog also using the md5sum. 2010-10-16 21:20:46 +00:00
frosch
c64d7346f8 (svn r20952) -Add: When printing the gamelog keep track of added/removed Grfs and check them for consistency. 2010-10-16 21:13:55 +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
frosch
ed4f806f1d (svn r20283) -Codechange: Unify start of doygen comments. 2010-08-01 19:22:34 +00:00
rubidium
b8487afe54 (svn r20192) -Cleanup: bye bye variables.h, bye bye VARDEF... you won't be missed :) 2010-07-19 17:28:27 +00:00
rubidium
644deff9d2 (svn r20191) -Codechange: unVARDEF _tick_counter and move it to a more logical location 2010-07-19 17:24:33 +00:00
frosch
56fbbdeafd (svn r19972) -Change: Use the md5sum from the previous save of the game for BaNaNaS instead of the initial (when the grf was added) md5sum from the gamelog. Neither method is 'better', but this way it is independent from the gamelog. 2010-06-13 14:11:32 +00:00
rubidium
062dd0e24c (svn r19814) -Codechange: give some more unnamed enums a name, in case they consisted of unrelated values use static const (u)int 2010-05-13 10:14:29 +00:00
rubidium
0903463824 (svn r19391) -Fix (r19255): shuffling around GRFIdentifier in GRFConfig caused gamelog to log the wrong data which could cause crashes later on when that data is queried 2010-03-12 19:18:26 +00:00