Commit Graph

18 Commits

Author SHA1 Message Date
Jan Engelhardt
ab0e1c7f5b scripts: delete empty function bodies 2024-11-03 23:39:38 +01:00
Jan Engelhardt
b7838c1a85 scripts: replace in-constructor assignments by initializations 2024-11-03 23:39:37 +01:00
Jan Engelhardt
71772b9c9c Add "final" marker to a number of classes
Devirtualization is an optimization in the generated assembly: when a
class C is polymorphic but also final, ``((C *)ptr)->func()`` can be
turned from an indirect into a static call.
2024-11-03 23:39:37 +01:00
Jan Engelhardt
a58c2752e5 build: resolve 2107 instances of -Wdelete-non-virtual-dtor
scripts/Y2K.cpp:467:5: warning: deleting object of polymorphic class type
"LevelScript_0000" which has non-virtual destructor might cause undefined
behavior [-Wdelete-non-virtual-dtor]
  467 |     delete ((LevelScript_0000 *)ptr);
2024-11-03 23:39:37 +01:00
Jan Engelhardt
5f0bdf8184 Fix spello "it's" 2024-09-03 13:26:51 +02:00
GravisZro
f7ae658fe2 Modernize struct/enum/unions type declarations 2024-05-30 03:35:17 -04:00
GravisZro
dc91b22635 Fix rebase breakage 2024-05-24 09:13:36 -04:00
GravisZro
6a9ddd8736 Replace _vsnprintf/vsnprintf with std::vsnprintf 2024-05-24 08:52:59 -04:00
GravisZro
5e5e0c99c3 Replace "short" with "int16_t" and fix missing headers 2024-05-23 23:49:31 -04:00
GravisZro
26b7776f43 Replace "ubyte" with "uint8_t" 2024-05-23 23:07:26 -04:00
Thomas Roß
1bf84737e5 [Scripts] Dllexport script entry points. 2024-05-15 20:09:18 +02:00
Ryan C. Gordon
6c8977caf0
Heavy patching for compiler warnings.
The vast majority of this is fixing up `char *` that should be `const char *`
but a handful of other fixes, like potential buffer overflows that GCC
noticed, etc, were applied as well.

This removes `-Wno-write-strings` from CMakeLists.txt, as it is no longer
necessary, as there is no longer a flood of compiler warning spam when
building.

This does not fix all compiler warnings; there are still a handful, and they
are legitimate, but they can be dealt with in a future commit.
2024-04-29 00:18:56 -04:00
GravisZro
9a80863c7f Ensure STDCALL/STDCALLPTR is only invoked on x86
Prevent the code from trying to use stdcall for anything except (32-bit) x86 builds
because it's the only platform it's applicable for.
2024-04-21 22:24:50 -04:00
Kevin Bentley
1f45163248 Updated source to reflect the license that this code is released under. 2024-04-20 09:57:49 -06:00
C.W. Betts
57078ae4b5 Change most sprintf to snprintf.
This also includes vsprintf to vsnprintf.
2024-04-19 12:31:28 -06:00
Kevin Bentley
7399b5a2f2 Fix CRLF line endings. 2024-04-16 14:21:35 -06:00
Kevin Bentley
c6640cc631 clang-format on everything. 2024-04-16 12:56:40 -06:00
Kevin Bentley
df209742fc Initial import 2024-04-15 21:43:29 -06:00