Commit Graph

64 Commits

Author SHA1 Message Date
merni-ns 55a7c59d13 Remove: NPF and pathfinder change settings 2024-05-10 10:38:44 +02:00
Rubidium bab5a8a787 Codechange: use std::source_location over __FILE__ and __LINE__ for Backup 2024-03-10 10:14:20 +01:00
frosch 4d2fc28834 Codechange: wrap 'if' in macros into 'do { ... } while (false)', so it does not break on following 'else'. 2024-01-30 23:43:42 +01:00
Patric Stout 46b1114c67
Change: forcefully enable prefixing logs with date (#11930)
Additionally, add the log-level to the log message.
2024-01-30 22:02:16 +00:00
Peter Nelson c7d5cedc7b
Codechange: Replace C-style TICC/TOCC macros with C++ RAII implementation. (#11857)
Usage is more robust, and will always include timing when the TicToc object goes out of scope.
2024-01-21 18:38:40 +00:00
Patric Stout fa8294ebe7
Remove: rdtsc and TIC/TOC based on CPU ticks (#11856)
Use TIC/TOC based on std::chrono instead. This information is also
easier to compare with others, as although it depends on CPU, it
means a bit more if "yours takes 4ms and mine takes 10ms".
2024-01-21 15:38:15 +00:00
Peter Nelson 28ef5146ba Fix #11646: Non-thread safe shared buffer returned from GetLogPrefix().
Return string from GetLogPrefix instead of shared string's buffer.
2024-01-18 17:40:25 +01: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
Rubidium 53f83c31b0 Codechange: use std::string to return the debug level information 2023-06-02 17:07:18 +02:00
Rubidium 6f2f38b3ed Codechange: fmt (and std::format) do explicitly not support enums out-of-the-box
That it works for the version we have packaged it pure coincidence, as that is
one of the few versions that due to a bug allow it. So add the appropriate
template specialisations to support it out-of-the-box within OpenTTD.
2023-05-22 14:42:18 +02:00
Rubidium 07860e67e2 Codechange: use fmt::format_to to format the help message 2023-05-20 16:50:03 +02:00
Rubidium f5f6306af3 Codechange: use string/fmt instead of printf for ShowInfo(F) 2023-04-24 17:51:54 +02:00
Peter Nelson f6ad8e1c9c Change: Rename some freetype things to fontcache.
The font cache supports more than just FreeType as a font provider, but still used freetype in some naming.

This now uses more suitable terms.
2022-09-25 18:34:24 +01:00
Niels Martin Hansen c6953f13e4 Fix #9940: Print debuglevel parse errors to console when changed from console 2022-08-27 09:17:09 +02:00
Rubidium 92559e6f3a Fix #9388: thread unsafe use of NetworkAdminConsole/IConsolePrint 2021-09-01 22:40:44 +02:00
rubidium42 7d79180040 Codechange: use fmt in DebugPrint where applicable 2021-06-13 12:45:45 +02:00
rubidium42 352dbdd570 Cleanup: remove old DEBUG macro and debug function 2021-06-13 12:45:45 +02:00
rubidium42 55a11710a6 Codechange: convert printf DEBUG statements to fmt Debug statements 2021-06-13 12:45:45 +02:00
rubidium42 a99ac62c1a Codechange: use the fmt library for simpler debug formats 2021-06-13 12:45:45 +02:00
Patric Stout fe451b8dc7 Codechange: remove _realtime_tick variable 2021-02-27 00:36:14 +01:00
S. D. Cloudt 13cc8a0cee Cleanup: Removed SVN headers 2019-11-10 17:59:20 +00:00
JMcKiern 04f659e768 Fix: Some typos found using codespell 2019-09-29 21:27:32 +01:00
Gabda 7e7563f15f Add: Chrono based TIC() and TOC() in debug 2019-03-09 01:05:47 +01:00
Gabda 4be2c1022e Cleanup: changing variable names in TIC() and TOC()
Removing double underscores to be ANSI-C standard compliant.
2019-03-09 01:05:47 +01:00
Patric Stout 17bd580630
Remove: NO_DEBUG_MESSAGES was only read and setting it broke compilation (#6703)
Given any speed issue cannot be attributed to checking for _debug_NNN_level, removing this is a safe action

This fixes #6652.
2018-04-11 22:07:21 +02:00
rubidium 59ff2836d4 (svn r26195) -Codechange: move debug's ottd_rdtsc (CPU specific high precision timer) into cpu.h/cpp 2014-01-02 08:45:28 +00:00
planetmaker c24374f99c (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 2013-01-08 22:46:42 +00:00
alberth b57bef91a1 (svn r24099) -Add: Output list of -d option facilities with in the help text. 2012-04-07 20:55:55 +00:00
rubidium a48e3cb891 (svn r23854) -Codechange: make it easier to put random debug stuff into the random log 2012-01-26 17:24:56 +00:00
truebrain a8b22e5292 (svn r23386) -Fix: debug script related events to 'script' (removes 'ai') 2011-12-01 12:04:10 +00:00
rubidium 4d5dbf5170 (svn r22410) -Document: some more bits ;) 2011-05-02 16:14:23 +00:00
alberth dfeac6ba2e (svn r20784) -Doc: Doxyment a few debug line printing functions. 2010-09-11 11:48:37 +00:00
rubidium 34764feac2 (svn r20186) -Codechange: remove VARDEF from _realtime_tick and _rightclick_emulate 2010-07-19 16:21:49 +00:00
frosch 1d3adb2b66 (svn r19931) -Fix (r19914): Convert assertion in Backup<> destructor into DEBUG() output. It was triggered on exceptions, especially when aborting world generation. 2010-06-05 12:16:12 +00:00
smatz 0ef33548c2 (svn r19614) -Codechange: "it's" => "its" where appropriate 2010-04-12 14:12:47 +00:00
smatz 78ce2858fc (svn r19080) -Cleanup: remove unused _debug_ntp_level and _debug_ms_level 2010-02-10 16:12:54 +00:00
smatz ac6ff0de9b (svn r19079) -Codechange: use _debug_console_level instead of _stdlib_con_developer 2010-02-10 16:10:05 +00:00
rubidium b2e9b5d612 (svn r18683) -Fix: it's not an other 2010-01-01 18:45:40 +00:00
rubidium 0ef0e13795 (svn r18385) -Cleanup: remove the now unneeded multistop slot management code 2009-12-02 18:18:56 +00:00
rubidium 629b7fcfe5 (svn r18070) -Fix: some possible unwanted side effects if using some sorts of boolean expressions in DEBUG 2009-11-14 11:57:55 +00:00
rubidium b1561fcb52 (svn r17778) -Fix: remove unneeded newline from 'TOC' debug lines. 2009-10-15 20:15:12 +00:00
rubidium 324389cf0b (svn r17488) -Feature [FS#2339]: add the date to all logging in the (real, not in-game) console if show_date_in_console is set. For dedicated server binaries the default is 'on', for the rest it is 'off'. 2009-09-09 15:11:46 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
smatz 8bc244d14e (svn r16653) -Fix (r16269): TOC() macro was broken 2009-06-25 00:06:06 +00:00
smatz 64455d14ea (svn r16637) -Cleanup: remove unused _debug_station_level 2009-06-23 20:39:41 +00:00
smatz c03ce4b1c7 (svn r16492) -Remove: support for gcc2. It hasn't been able to compile OTTD for months. All attempts to do another workaround failed. 2009-06-01 11:49:46 +00:00
smatz f5316c5cbd (svn r16269) -Codechange: use gcc's ability to check parameters sent to printf-like functions
-Fix: wrong number of parameters or wrong parameter types sent to printf-like functions at several places
2009-05-10 17:27:25 +00:00
rubidium 3c6add5293 (svn r14772) -Codechange: make the "dump log of game to reproduce" desync debug stuff a runtime configurable debug option instead of a compile time option. 2008-12-29 21:50:25 +00:00
rubidium 69eb6978e7 (svn r14634) -Change: _rdtsc is defined by some platforms so we can't use that name. 2008-11-26 01:03:34 +00:00
smatz b3bafb1d9c (svn r13728) -Codechange: define DEBUG as an empty block so compiler warns us less 2008-07-18 12:20:30 +00:00