Rubidium
f16399f4c9
Codechange: replace x.size() > 0 with !x.empty()
2023-10-20 23:05:43 +02:00
Rubidium
c9276c2959
Codechange: replace x.size() == 0 with x.empty()
2023-10-20 23:05:43 +02:00
Peter Nelson
015fbafe34
Codechange: Add missing override specifiers to squirrel.
2023-09-25 21:27:45 +01:00
frosch
b6c8f301be
Codechange: Silence warnings about intentionally unused parameters.
2023-09-19 22:49:59 +02:00
Rubidium
4cf88e068a
Remove: unused include of cstdarg/stdarg.h
2023-09-16 23:09:53 +02:00
Patric Stout
ba67f39db6
Codechange: vendor the nlohmann-json library ( #11290 )
2023-09-13 16:11:34 +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
Rubidium
4fbc81003f
Codechange: make SQString::Create that supports std::string and use that
2023-06-20 15:25:17 +02:00
Owen Rudge
1a3d1bca59
Remove: OS/2 port
2023-06-16 14:29:14 +01:00
Rubidium
a541b8217d
Codechange: use fmt::format to build Squirrel error message
2023-06-07 08:02:58 +02:00
Rubidium
10e12154f5
Fix: false positive warning in fmt library (backport ef55d4f of upstream fmt)
2023-06-02 11:57:23 +02:00
Loïc Guilloux
c880157518
Fix: Check max member count in squirrel classes ( #10883 )
...
Manual cherry-pick from 23a0620658
2023-05-27 16:09:21 +00:00
PeterN
101e4e54a1
Fix d9a04ba446: Ensure MD5Hash is initialized. ( #10876 )
...
Not all instances need to be initialized as often they are copied or
written to, but doing all ensures no surprises.
Move the ^= operator to MD5Hash while we're at it.
2023-05-26 18:17:54 +00:00
Loïc Guilloux
db3b086a52
Fix #10867 , 8b93e45: Squirrel compile error exception type changed ( #10869 )
2023-05-25 12:46:27 +02:00
Rubidium
eb635b85bb
Fix: work around GCC compiler bug #105120 in fmt
...
The fmt code pushes a pragma option, and later pops is. The intrinsics code
interacts with it via the __OPTIMIZE__ macro. This has been set by the pragma
option push, but not unset/reset to the original with the pop.
Since the pragma is only used for the GCC compiler (not Clang, not MSVC, not
ICC) and in debug mode, just remove the whole pragma handling for it.
2023-05-22 14:42:18 +02:00
Rubidium
187fa3f214
Codechange: update to fmt 10.0.0 and add formatting support for chrono and std types
2023-05-22 14:42:18 +02:00
Loïc Guilloux
8d2a0a7da4
Fix #10846 : [Squirrel] Ensure sqvector size does not overflow ( #10848 )
2023-05-20 14:43:22 +00:00
Rubidium
d9a04ba446
Codechange: make the MD5 hash/digest/checksum variables a std::array
2023-05-19 11:24:44 +02:00
Rubidium
e035705239
Codechange: introduce and use std::string variant of sq_throwerror
2023-05-14 22:54:10 +02:00
Rubidium
6e3d3c0e7c
Codechange: introduce std::string variant of sq_pushstring
2023-05-09 23:14:48 +02:00
Patric Stout
81d4fa6999
Feature: drop ICU-lx in favour of directly interfacing with harfbuzz
...
This means we have RTL support again with ICU 58+. It makes use of:
- ICU for bidi-itemization
- ICU for script-itemization
- OpenTTD for style-itemization
- harfbuzz for shaping
2023-05-01 22:17:56 +02:00
PeterN
57f2d70fef
Change: Use cstdint instead of rolling our own types. ( #10651 )
2023-04-27 10:04:18 +02:00
Rubidium
8f24901843
Codechange: replace printf with PRINTF macros by fmt::format for scripts
2023-04-24 17:51:25 +02:00
Rubidium
484883e6e1
Cleanup: remove (unused) Squirrel code that used a hack to work around printf safety
2023-04-24 17:51:25 +02:00
Rubidium
5733142b0d
Codechange: use string/fmt instead of printf for Squirrel's Raise_Error
2023-04-24 17:51:25 +02:00
Rubidium
8b93e45e22
Codechange: use string/fmt instead of printf for squirrel's PRINTFUNC
2023-04-24 17:51:25 +02:00
Rubidium
88ead3f102
Add: catch2 v2.13.10
2023-04-16 18:58:21 +02:00
rubidium42
6ba55e663e
Codechange: do not hide variables with other variables
2023-01-29 07:21:34 +01:00
rubidium42
1951af07c0
Codechange: do not hide parameters with local variables
2023-01-29 07:21:34 +01:00
Rubidium
71b46db8d0
Cleanup: remove commented out code
2023-01-26 23:47:55 +01:00
Rubidium
5863d78cb4
Codechange: use commented out code, or guard by #ifdef
2023-01-26 23:47:55 +01:00
Rubidium
ae422be979
Cleanup: remove/replace trailing ; with . in comments
2023-01-26 23:47:55 +01:00
Rubidium
20a9e13272
Fix: inconsistent definition of copy constructor and assignment
2023-01-15 00:24:20 +01:00
Rubidium
f7af9a299a
Codechange: prevent suspicious pointer scaling
2023-01-06 19:34:35 +01:00
glx22
012fd2be0d
Codechange: Suppress warnings when asserts are disabled
2022-12-30 02:17:38 +01:00
Loïc Guilloux
ccd586a736
Fix #9588 , 140a96b: [Squirrel] Reaching memory limit during script registration could prevent further script detections ( #9589 )
...
Also the memory allocation triggering the limit was never freed.
And if the exception was thrown in a constructor using placement new, the pre-allocated memory was not freed either.
2021-10-02 15:13:58 +02:00
Rubidium
281a65b3e1
Cleanup: simplify some boolean expressions
2021-06-17 16:18:30 +02:00
Rubidium
a9774f3e34
Cleanup: [Squirrel] Use nullptr instead of 0 or NULL
2021-06-17 16:18:30 +02:00
rubidium42
c811d42d0c
Fix a99ac62: fmt's include of cassert breaks our assert logic
2021-06-13 21:02:17 +02:00
rubidium42
662d8dfc30
Add: minimal set of headers from {fmt} 7.1.3 to 3rdparty
2021-06-13 12:45:45 +02:00
glx22
00e3fddd0c
Fix: [MinGW] Unused squirrel code triggering a warning
2021-06-10 23:17:29 +02:00
Patric Stout
28e90769f7
Codechange: use "[[maybe_unused]]" instead of a wide variety of other ways we had
...
While at it, replace OTTD_ASSERT with WITH_ASSERT, as this
is always set if assert() is valid. No matter if NDEBUG is set
or not.
2021-06-03 17:30:00 +02:00
Rubidium
5c01f9ea52
Fix #9267 , 47a99bb: [Squirrel] Heap use after free
...
Due to 47a99bb
the order of elements in the garbage collection chain has
changed causing the class to be finalised before the instances of that class.
Since the instance's array of member values depends on the size of the values
in the class, the class finalisation resetting that size to 0 causes not all
finalisations to run, which subsequently causes a heap use after free. So,
just set the SQObjectPtrs to 'null' during the finalisation of the SQClass
so the SQInstance can release all instance variables during its finalisation.
2021-05-16 10:07:38 +02:00
Rubidium
44d1b964bf
Fix #7513 : recursive array/class/table release caused stack overflow
2021-04-17 19:18:51 +01:00
Rubidium
47a99bb676
Fix #7513 : recursive garbage collection caused stack overflow
2021-04-17 19:18:51 +01:00
Charles Pigott
dd798d688b
Fix #8919 : Release builds with asserts enabled ( #8925 )
2021-04-01 23:57:49 +01:00
Charles Pigott
591ea9862d
Codechange: Suppress warnings when asserts are disabled ( #8916 )
2021-04-01 10:03:12 +02:00
Michael Lutz
9a069faa01
Codechange: [Win32] Try to get an OpenGL 3.2+ context if possible.
2021-02-22 22:16:07 +01:00
Michael Lutz
ef478ade64
Add: [Win32] Video driver that uses OpenGL to transfer the video buffer to the screen.
2021-02-22 22:16:07 +01:00
Charles Pigott
9b800a96ed
Codechange: Remove min/max functions in favour of STL variants ( #8502 )
2021-01-08 11:16:18 +01:00