HP van Braam
cccd2432c3
Refactor CommandQueueMT to use vararg templates
...
In order to make CommandQueueMT more maintainable this PR changes the
previous macro hell with variadic templates instead. This makes the
class far more explicit and will allow us to more easily change the way
the class functions in the future.
Furthermore this refactoring has allowed for some optimizations. In
particular by using std::forward to delay the decision of decaying the
type to as late as possible we are able to move the data from the
callsite into our Command buffer and later move it to the call.
In practice what this means is that compared to the old version instead
of copying values 3 times, we can now get away with 1 copy, and 1 move
for lvalues, and just 2 moves for rvalues. This saves quite a few
operations in a hot codepath.
We also now test to make sure that the amount of copies and moves are
what we expect. This way we can spot performance regressions in this
code easily.
Somewhat unscientifically, running TPS-demo by pressing enter and not
touching the controls average mspf, repeatable across many runs:
before: 6.467
after : 6.202
2025-01-02 15:35:08 +01:00
Kiro
176e5f42b2
add Static assert checks
2025-01-02 09:02:43 +01:00
Silc Lizard (Tokage) Renew
d0c421976c
Fix looking at with 180 degree arc
...
Co-authored-by: Fruitsalad <949631+fruitsalad@users.noreply.github.com>
2025-01-02 15:47:01 +09:00
Rémi Verschelde
f2d4dac92e
Thread: Re-add `<new>` include for `std::hardware_destructive_interference_size`
...
Somehow it would still build fine, but would crash when compiled with GCC 12.2
on Debian 12.
Also re-add wrongly removed Mutex include from `thread_safe.h`, where it's used
in macros.
Add IWYU pragma comments to prevent it from mistakenly flagging those as unused.
2025-01-01 22:43:42 +01:00
AThousandShips
25ecf5ec83
[Core] Fix UID encoding
...
Fixes edge case where `0` encoded as `uid://` instead of `uid://a`, and
fixes the size of the temporary buffer storing encoded UID strings.
2024-12-31 15:20:09 +01:00
Jan Haller
df66ea74d7
Fix `NodePath::slice()` incorrect behavior for subname indexing
...
Adjust slice boundaries in `NodePath` logic to correctly handle subnames.
Update test cases to reflect these changes.
2024-12-30 21:22:26 +01:00
Kiro
52ee437d7e
try Fixing Variant workaround
2024-12-29 16:35:10 +01:00
kobewi
4e48b19e1f
Add Color.from_rgba8 and deprecate Color8
2024-12-27 11:26:59 +01:00
kobewi
81b1138a7f
Fix icon UIDs in Project Manager
2024-12-26 14:54:09 +01:00
HP van Braam
46c23e1758
Don't set Variant::Type in destructor
...
When profiling Dome Keeper, I found that in physics_process a HashMap
gets cleared a lot, which ends up calling the Variant destructor.
Calling Variant::clear() dominates this operation.
By not uselessly setting the Type to NIL on destruction we save about
50% of time. This is likely because if there is a simple type in the
Variant that doesn't need destructing, but now we write when we should
just drop the Variant altogether.
Since the value of Variant::type should be unobservable after
destruction this doesn't change any outward behavior.
2024-12-25 23:40:19 +01:00
Hugo Locurcio
62c17911ea
Add more property hint ranges for project settings
...
- Tweak property hint ranges for some networking settings to ensure
the minimum values don't break the debugger entirely.
- Ensure shader time rollover is set to at least 1, as 0 causes a division by
zero to occur.
All relevant project settings are now covered by a range hint.
2024-12-23 18:22:32 +01:00
Thaddeus Crews
08d4dd7fd8
Merge pull request #100694 from Ivorforce/cowdata-destruct-graciously
...
Destruct `CowData` more graciously by avoiding accidentally exposing a half-destructed buffer.
2024-12-23 11:15:18 -06:00
Thaddeus Crews
b97c8b37f6
Merge pull request #98441 from Yelloween10/fix-modifier-mask
...
Fix incorrect `KEY_MODIFIER_MASK` value
2024-12-23 11:15:17 -06:00
Thaddeus Crews
3c304ab7cc
Merge pull request #96076 from AThousandShips/improve_null_check_core_drivers
...
[Core,Drivers] Improve use of `Ref.is_null/valid`
2024-12-23 11:14:58 -06:00
Yufeng Ying
73d85f46c9
Remove unused headers in scene.
...
Co-authored-by: Thaddeus Crews <repiteo@outlook.com>
Co-authored-by: A Thousand Ships <96648715+AThousandShips@users.noreply.github.com>
2024-12-24 00:40:09 +08:00
Rémi Verschelde
31c07776f4
Merge pull request #100683 from Ivorforce/localvector-vector-conversion-typesafe-copy
...
Make `LocalVector` -> `Vector` automatic conversion safe for non-trivial types.
2024-12-22 00:10:19 +01:00
Lukas Tenbrink
25cd923ea1
Destruct `CowData` more graciously by avoiding accidentally exposing a half-destructed buffer. This can avoid problems if any of the destructed objects tries to access the data while it's being destructed.
2024-12-21 20:01:03 +01:00
Lukas Tenbrink
0e32f3b957
Make `LocalVector` -> `Vector` automatic conversion safe for non-trivial types.
2024-12-21 10:28:57 +01:00
Rémi Verschelde
dac0b67c4d
Merge pull request #100659 from clayjohn/color-srgb-precision
...
Increase precision in `linear_to_srgb()` and `srgb_to_linear()`
2024-12-20 23:57:35 +01:00
Rémi Verschelde
c9e99291c1
Merge pull request #100622 from dsnopek/gdextension-compat-hashes
...
Rename `GDExtensionCompatHashes` to make it clear it's only for exceptional situations
2024-12-20 23:57:02 +01:00
Rémi Verschelde
119c99a8d0
Merge pull request #100193 from raulsntos/gdextension/set_class_icon
...
GDExtension: Add method to set the class icon
2024-12-20 23:56:48 +01:00
Rémi Verschelde
a11364d1e6
Merge pull request #99010 from Hilderin/embedding-game-process
...
Embed game process in editor
2024-12-20 23:56:43 +01:00
clayjohn
46ce499b6f
Increase precision in linear_to_srgb and srgb_to_linear
...
This avoids the situation where white stops being white after conversion. While maintaining as much floating point ops as possible
2024-12-20 10:49:43 -07:00
Thaddeus Crews
151e7fc687
Merge pull request #100477 from Ivorforce/cowdata-move-insert-n-remove
...
Optimize `CowData` and `LocalVector` functions `.insert` and `.remove_at` by using move semantics.
2024-12-19 20:00:20 -06:00
Thaddeus Crews
1b8a2d930f
Merge pull request #100474 from Ivorforce/cowdata-abstract-realloc
...
Abstract `CowData`'s reallocations into `_realloc` to consolidate duplicate logic.
2024-12-19 20:00:19 -06:00
Thaddeus Crews
fb8d2ee044
Merge pull request #100582 from bruvzg/fix_in_ops
...
[GDScript] Fix `Packed*Array` `OP_IN` using low precision int and float as input.
2024-12-19 20:00:06 -06:00
Thaddeus Crews
416a86f47c
Merge pull request #100434 from Ivorforce/string-copy-from-rename
...
Rename `String::copy_from` functions to their respective encodings (`parse_latin1`, `parse_wstring`, `parse_utf32`).
2024-12-19 19:59:57 -06:00
Thaddeus Crews
bf9ef5f8a5
Merge pull request #100564 from YYF233333/iwyu
...
Remove unused headers in core
2024-12-19 19:59:55 -06:00
Thaddeus Crews
92615f24e7
Merge pull request #100563 from Ivorforce/move-semantics-list
...
Add move semantics (constructor, operator=) to `List`.
2024-12-19 19:59:54 -06:00
Thaddeus Crews
0b01f3cc14
Merge pull request #100560 from Ivorforce/localvector-move-semantics
...
Add `LocalVector` move semantics (constructor and operator=).
2024-12-19 19:59:51 -06:00
Thaddeus Crews
eaa447135c
Merge pull request #95920 from Repiteo/core/initializer-list-templates
...
Core: Expand `std::initializer_list` support in container templates
2024-12-19 19:59:42 -06:00
Thaddeus Crews
a94b559f9b
Merge pull request #100483 from Ivorforce/string-name-move-semantics
...
Add move semantics (constructor, assignment) to `StringName`.
2024-12-19 19:59:34 -06:00
David Snopek
506600a560
Rename `GDExtensionCompatHashes` to make it clear it's only for exceptional situations
2024-12-19 18:08:42 -06:00
Lukas Tenbrink
8483d794ff
Abstract `CowData`'s reallocations into `_realloc` to consolidate duplicate logic.
2024-12-19 17:27:16 +01:00
Lukas Tenbrink
3564e7c231
Add `LocalVector` move semantics (constructor and operator=).
2024-12-19 15:05:05 +01:00
Lukas Tenbrink
19992e3284
Add move semantics (constructor, operator=) to `List`.
2024-12-19 15:04:15 +01:00
Kiro
06efe84bca
Remove duplicate `utf8()` calls
2024-12-19 10:15:46 +01:00
Thaddeus Crews
361e3b4fe8
Core: Expand `std::initializer_list` support
2024-12-18 18:46:59 -06:00
Hilderin
9d2a4c03be
Embedding game process in editor
2024-12-18 17:52:42 -05:00
Pāvels Nadtočajevs
eaf2d7c5b0
[GDScript] Fix `Packed*Array` `OP_IN` using low precision int and float as input.
2024-12-18 23:41:27 +02:00
Yufeng Ying
be86ce3103
Apply iwyu suggestion in core.
2024-12-19 00:43:47 +08:00
Rémi Verschelde
851d8e49e8
Merge pull request #100386 from hpvb/core-ubsan
...
Core: Fix UBSAN reports
2024-12-18 17:23:32 +01:00
HP van Braam
240f510fa7
Core ubsan fixes
...
This fixes UBSAN errors reported by running our testsuite, importing the
TPS demo, and running the TPS demo. I have tried, wherever possible, to
fix issues related to reported issues but not directly reported by UBSAN
because thse code paths just happened to not have been exercised in
these cases.
These fixes apply only to errors reported, and caused by, core/
The following things have been changed:
* Make sure there are no implicit sign changing casts in core.
* Explicitly type enums that are part of a public API such that users of
the API cannot pass in wrongly-sized values leading to potential stack
corruption.
* Ensure that memcpy is never called with invalid or null pointers as
this is undefined behavior, and when the engine is built with
optimizations turned on leads to memory corruption and hard to debug
crashes.
* Replace enum values only used as static values with constexpr static
const values instead. This has no runtime overhead. This makes it so
that the size of the enums is explicit.
* Make sure that nan and inf is handled consistently in String.
* Implement a _to_int template to ensure that all of the paths use the
same algorhithm, and correct the negative integer case.
* Changed the way the json serializer precision work, and added tests to
verify the new behavior. The behavior doesn't quite match master in
particulary for negative doubles as the original code tried to cast -inf
to an int. This then led to negative doubles losing all but one of
their decimal points when serializing. Behavior in GDScript remains
unchanged.
2024-12-18 14:31:12 +01:00
Rémi Verschelde
d328c00ad3
Merge pull request #99667 from RandomShaper/res_load_verb
...
ResourceLoader: Print load message only when actually loading
2024-12-18 09:53:06 +01:00
Pedro J. Estébanez
6740823e40
ResourceLoader: Print load message only when actually loading
2024-12-18 09:36:16 +01:00
Yelloween
0153cb8c16
Fix incorrect MODIFIER_MASK value
...
Updated key modifier mask and documented API change
Changed the old value
Changed the old value inside the .expected file
Resolved Conflicts
Moved changes to the end
2024-12-18 02:59:29 +03:00
Hugo Locurcio
7a04d85ec3
Only allow valid types in Decal, Light3D projector, PointLight2D texture and CSGMesh3D mesh
...
If an invalid type is supplied (which can still be done from a script),
a warning is printed (along with a workaround for ViewportTexture).
This also adds support for "negative" resource hints such as
"Texture2D,-ViewportTexture" to exclude one or more subclasses
from a class hint.
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
2024-12-17 20:41:12 +01:00
Lukas Tenbrink
a636c04244
Optimize `CowData` and `LocalVector` functions `.insert` and `.remove_at` by using move semantics.
2024-12-17 14:10:10 +01:00
Raul Santos
69f1cc10b6
GDExtension: Add icon path to class creation info
...
Allows GDExtensions to set the icon of a class programmatically, which is useful for extensions that don't use a `.gdextension` file.
2024-12-17 08:43:12 +01:00
MJacred
40832387ce
Fix Input::remove_joy_mapping
...
Erasing a joypad mapping can invalidate other attached joypads and the fallback mapping guid
2024-12-16 20:27:33 +01:00
Thaddeus Crews
24a8c05cbd
Merge pull request #100335 from kiroxas/Improve`ResourceUID--id_to_text`Performance
...
Improve `ResourceUID::id_to_text` performance
2024-12-16 12:10:05 -06:00
Thaddeus Crews
e42c22f359
Merge pull request #100426 from Ivorforce/variant-move-constructor
...
Add move assignment and move constructor to Variant.
2024-12-16 12:09:52 -06:00
Thaddeus Crews
9c9af038d5
Merge pull request #91060 from dalexeev/code-edit-add-doc-tooltips
...
Code Editor: Add documentation tooltips
2024-12-16 12:09:45 -06:00
Thaddeus Crews
7254761a46
Merge pull request #98861 from MJacred/get_joypad_infos_on_windows
...
Get joypad's vendor ID, product ID and name on Windows for XInput devices.
2024-12-16 12:09:44 -06:00
Thaddeus Crews
a7fa0528bb
Merge pull request #100372 from Calinou/os-add-get-version-alias
...
Add `OS.get_version_alias()` to return a human-readable Windows/macOS version number
2024-12-16 12:09:40 -06:00
Lukas Tenbrink
8c4e674770
Add move semantics (constructor, assignment) to `StringName`.
2024-12-16 19:02:52 +01:00
Rémi Verschelde
08508d2e01
Merge pull request #99700 from hpvb/scene_tree_editor_performance
...
Improve Scene Tree editor performance
2024-12-16 17:16:00 +01:00
MJacred
01a2726c59
Get joypad's vendor ID, product ID, and name on Windows
2024-12-15 23:59:11 +01:00
Lukas Tenbrink
df3e9291c6
Rename `String::copy_from` functions to their respective encodings (`parse_latin1`, `parse_wstring`, `parse_utf32`).
2024-12-15 21:46:50 +01:00
Lukas Tenbrink
34fa0bf3ec
Add move assignment and move constructor to Variant.
...
Add `_to_variant` helper functions to `gdvirtual.gen.inc` to work around an MSVC bug.
2024-12-15 14:38:46 +01:00
Kiro
5f401e63b5
Improve `ResourceUID::id_to_text` performance
2024-12-15 10:41:13 +01:00
Danil Alexeev
80d11500b5
Code Editor: Add documentation tooltips
2024-12-15 10:51:33 +03:00
Hugo Locurcio
928982891e
Add `OS.get_version_alias()` to return a human-readable Windows/macOS version number
...
Windows 11's major version number is actually 10.x.x, which can be confusing
if you don't know about this quirk. `OS.get_version_alias()` avoids this
by displaying the "branding" version number and the build number as a suffix,
so that individual updates can still be distinguished from each other.
On macOS, `OS.get_version_alias()` returns the version number prepended
with the version name (e.g. Sequoia for macOS 15).
On other operating systems, this returns the same value as `OS.get_version()`.
2024-12-14 18:47:50 +01:00
Rémi Verschelde
68559c4906
Merge pull request #100367 from Ivorforce/swap-move
...
Optimize `SWAP` macro by using move semantics.
2024-12-14 18:25:42 +01:00
Hilderin
4e19ab8afe
Fix connecting a signal with a double click is too difficult
...
Co-authored-by: Danil Alexeev <dalexeev12@yandex.ru>
2024-12-14 16:18:34 +03:00
Markus Sauermann
ee2930cad4
Remove temporary project conversion
...
This project conversion should be removed before the next stable release,
because it affects only projects opened during dev-builds.
2024-12-14 00:37:47 +01:00
Lukas Tenbrink
383d933f53
Optimize `SWAP` macro by using move semantics.
2024-12-13 16:19:52 +01:00
Thaddeus Crews
ba2c5c1e61
Merge pull request #100318 from dsnopek/stream-peer-extension-put-partial-data-bug
...
Fix `StreamPeerExtension::put_partial_data()` to call `_put_partial_data()`
2024-12-12 16:13:38 -06:00
Thaddeus Crews
9fba62a938
Merge pull request #100239 from Ivorforce/cowdata-move-constructor
...
Add move constructor and move assignment to `CowData`, `String`, `Char16String`, `CharString`, and `Vector`.
2024-12-12 16:13:30 -06:00
Thaddeus Crews
9c290c4c56
Merge pull request #100033 from Daylily-Zeleen/daylily-zeleen/optimize_callable_to_string
...
Optimize callable's stringify text.
2024-12-12 16:13:23 -06:00
HP van Braam
6f7525c396
Improve Scene Tree editor performance
...
We now cache the Node*<>TreeItem* mapping in the SceneTreeEditor. This
allows us to make targeted updates to the Tree used to display the scene
tree in the editor.
Previously on almost all changes to the scene tree the editor would
rebuild the entire widget, causing a large number of deallocations an
allocations. We now carefully manipulate the Tree widget in-situ saving
a large number of these allocations.
In order to know what Nodes need to be updated we add a
editor_state_changed signal to Node, this is a TOOLS_ENABLED,
editor-only signal fired when changes to Node happen that are relevant
to editor state.
We also now make sure that when nodes are moved/renamed we don't check
expensive properties that cannot contain NodePaths. This saves a lot of
time when SceneTreeDock renames a node in a scene with a lot of
MeshInstances. This makes renaming nodes go from ~27 seconds to ~2
seconds on large scenes.
SceneTreeEditor instances will now also not do all of the potentially
expensive update work if they are invisible. This behavior is turned off
by default so it won't affect existing users. This change allows the
editor to only update SceneTreeEditors that actually in view. In
practice this means that for most changes instead of updating 6
SceneTreeEditors we only update 1 instantly, and the others only when
they become visible.
There is definitely more that could be done, but this is already a
massive improvement. In complex scenes we see an improvement of 10x,
things that used to take ~30 seconds now only take 2.
This fixes #83460
I want to thank KoBeWi, TokisanGames, a-johnston, aniel080400 for
their tireless testing. And AeioMuch for their testing and providing a
fix for the hover issue.
2024-12-12 22:47:05 +01:00
David Snopek
8c01fc2274
Fix `StreamPeerExtension::put_partial_data()` to call `_put_partial_data()`
2024-12-12 08:31:12 -06:00
Rémi Verschelde
7b15c0622e
Merge pull request #100295 from Ivorforce/string-builder-inplace
...
Optimize `StringBuilder.as_string` by constructing the string in-place and skipping unnecessary checks.
2024-12-12 14:10:21 +01:00
Rémi Verschelde
321bd35317
Merge pull request #100294 from Ivorforce/count-no-realloc
...
Optimize `String.count` and `String.countn` by avoiding repeated reallocations.
2024-12-12 14:10:17 +01:00
Rémi Verschelde
819db4daf5
Merge pull request #99559 from mayoff/OperatorEvaluatorModNZ-ptr_evaluate
...
Fix `Variant` modulo operation
2024-12-12 14:09:59 +01:00
Rémi Verschelde
1e1e862204
Merge pull request #98100 from BlueCube3310/image-cleanup-more
...
Image: More cleanup and reduced code duplication
2024-12-12 14:09:49 +01:00
BlueCube3310
335077a03f
Image: More cleanup and reduced code duplication.
2024-12-12 11:52:59 +01:00
Lukas Tenbrink
76af9537ed
Optimize `StringBuilder.as_string` by constructing the string in-place and skipping unnecessary checks.
...
Co-authored-by: YYF233333 <nbyyf2002@mail.ustc.edu.cn>
2024-12-12 01:35:02 +01:00
Thaddeus Crews
c5e6f6276b
Merge pull request #100110 from DarioSamo/rd-get-data-async
...
Implement `RD::buffer_get_data_async()` and `RD::texture_get_data_async()`
2024-12-11 17:35:29 -06:00
Lukas Tenbrink
ef3eecd34e
Optimize `String.count` and `String.countn` by avoiding repeated reallocations.
2024-12-12 00:28:13 +01:00
Dario
054891de04
Implement buffer_get_data_async and texture_get_data_async.
2024-12-11 11:55:23 -08:00
Rémi Verschelde
c2e4ae782a
Merge pull request #100235 from akien-mga/revert-97303
...
Revert "Avoid duplicating signals from scene instances into packed scenes"
2024-12-11 18:48:18 +01:00
Lukas Tenbrink
57073ba14e
Add move constructor and move assignment to CowData, String, Char16String, CharString and Vector.
2024-12-11 15:52:15 +01:00
Rémi Verschelde
44dfa7e710
Merge pull request #99895 from mihe/jolt-physics
...
Add Jolt Physics as an alternative 3D physics engine
2024-12-11 14:53:57 +01:00
Mikael Hermansson
d470c2ac6a
Add Jolt Physics as an alternative 3D physics engine
...
Co-authored-by: Jorrit Rouwe <jrouwe@gmail.com>
2024-12-11 13:57:25 +01:00
Thaddeus Crews
ba66c478c0
Merge pull request #100041 from Ivorforce/optimize-string-similarity
...
Optimize String.similarity by avoiding allocation for bigrams.
2024-12-10 14:16:00 -06:00
Thaddeus Crews
3ef8e835c2
Merge pull request #99775 from Ivorforce/string-builder-template-append
...
Optimize StringBuilder by using `LocalVector` instead of `Vector`.
2024-12-10 14:15:58 -06:00
Thaddeus Crews
8f16f864a6
Merge pull request #99765 from dalexeev/core-fix-json-from-to-native
...
Core: Fix `JSON.{from,to}_native()` issues
2024-12-10 14:15:53 -06:00
Thaddeus Crews
d108d4f29e
Merge pull request #100147 from esainane/vector-victor
...
Remove apparent contradiction in vector.h header
2024-12-10 14:15:52 -06:00
Thaddeus Crews
78215f3cc6
Merge pull request #100132 from Ivorforce/string-compile-time-strlen
...
Optimize String construction from statically known strings by evaluating `strlen` at compile-time.
2024-12-10 14:15:49 -06:00
Yufeng Ying
bdf24924e6
[Codestyle] Merge identical code piece.
2024-12-11 00:48:00 +08:00
Rémi Verschelde
2153a60425
Revert "Avoid duplicating signals from scene instances into packed scenes"
...
This partially reverts commit 8a42e3d3ef .
Comment improvements and the test case were kept, with one part commented out.
2024-12-10 10:42:58 +01:00
Sai Nane
66b7d5f1b5
Remove apparent contradiction in vector.h header
...
3205a92ad8 was a major commit which removed `PoolVector`, and replaced
most references to `PoolVector` with `Vector` instead. In most cases,
this was appropriate, given that `PoolVector` was being replaced with
`Vector`, as an effective generalist in 64-bit address space layouts.
However, vector.h itself was left with an artifact advising the reader
to use `Vector` instead of `Vector` for large arrays. While this led
to a fascinating deep dive, and hopefully improved some of the
documentation along the way, it's probably best to clean this up for
the next person.
2024-12-10 01:51:30 +00:00
Lukas Tenbrink
a3f48f7047
Optimize String construction from statically known strings allowing `strlen` to be evaluated at compile time, where possible.
2024-12-09 21:47:28 +01:00
Thaddeus Crews
4b1a51d3e3
Merge pull request #100075 from demolke/simplify
...
Fix handling of leading `..` in simplify_path
2024-12-09 14:33:34 -06:00
Thaddeus Crews
5b312d0e59
Merge pull request #99816 from Ivorforce/string-copy-from-optimizations
...
Optimize `String::copy_from` and `String::copy_from_unchecked` implementations, improving String allocation speed.
2024-12-09 14:33:33 -06:00
Thaddeus Crews
da8b9ba1ff
Merge pull request #99168 from RandomShaper/even_better_spinlock
...
SpinLock: Overhaul false sharing prevention
2024-12-09 14:33:31 -06:00
Thaddeus Crews
7d4db793e6
Merge pull request #100044 from Yelloween10/fix-input-event-metadata
...
Fix discarded input event metadata in `xformed_by`
2024-12-09 14:33:27 -06:00
Thaddeus Crews
473c28b1ad
Merge pull request #98118 from bruvzg/escape_colors
...
Add support for 24-bit color escape sequences, simplify `print_rich` BBCode parsing.
2024-12-09 14:33:25 -06:00
Thaddeus Crews
a607bca2fd
Merge pull request #100024 from Ivorforce/optimize-string-single-char
...
Optimize string single char contains calls.
2024-12-09 14:33:24 -06:00
Thaddeus Crews
2654dbaf5c
Merge pull request #99984 from KoBeWi/negative_diff_but_it's_deleting_whole_files
...
Move singleton StringName definitions to header
2024-12-09 14:33:11 -06:00
Lukas Tenbrink
8df2dbe2f6
Optimize StringBuilder append for static strings, and as_string().
2024-12-08 16:39:25 +01:00
Lukas Tenbrink
875b48366c
Optimize String.similarity by avoiding allocation for bigrams.
2024-12-08 13:28:40 +01:00
Lukas Tenbrink
e1c42392c2
Improve string copy_from and copy_from_unchecked implementations, by making use of caller contracts and language spec (NULL termination and casts).
2024-12-07 01:41:25 +01:00
Lukas Tenbrink
b5c31ebb41
Add contains_char() for single-character 'contains' calls.
2024-12-06 20:23:35 +01:00
Yelloween
98a23136d5
Fix missing event metadata in _input() with Input.parse_input_event()
...
Use merge_meta_from() for metadata copying.
Fixed include order
Removed unnecessary line
2024-12-06 22:08:16 +03:00
kobewi
d3c9bee653
Move singleton StringName definitions to header
2024-12-06 13:43:31 +01:00
demolke
964e2b3a9e
Fix handling of leading `..` in simplify_path
...
Prior to this `..\..\texture.png` was incorrectly simplified to `texture.png`
2024-12-06 07:53:55 +01:00
Thaddeus Crews
45734bd451
Merge pull request #99817 from Ivorforce/strlen-char32_t
...
Use `strlen()` 3 times instead of custom length check implementations in ustring
2024-12-05 14:12:21 -06:00
Thaddeus Crews
06cce0e81a
Merge pull request #100016 from Ivorforce/camelcase-to-underscore-rolling-cache
...
Optimize `_camelcase_to_underscore` (and thus `String.capitalize`)
2024-12-05 14:11:59 -06:00
Thaddeus Crews
3a948abdce
Merge pull request #100015 from Ivorforce/is-valid-filename-cache
...
Optimize `String::is_valid_filename()` and `String::validate_filename()`
2024-12-05 14:11:57 -06:00
Thaddeus Crews
9951743adf
Merge pull request #97822 from stdmnpkg/loongarch
...
Add loongarch64 support for Linux/*BSD
2024-12-05 14:11:44 -06:00
Student Main
e0693f8ad8
Add loongarch64 support
2024-12-06 00:18:26 +08:00
Daylily-Zeleen
614a51f293
Optimize callable's stringify text.
2024-12-05 14:24:39 +08:00
Lukas Tenbrink
8d82933c7c
Optimize _camelcase_to_underscore (and thus String.capitalize) by using a rolling cache of character attributes, instead of re-computing each iteration.
2024-12-04 18:39:38 +01:00
Thaddeus Crews
451fd7a436
Merge pull request #99540 from dalexeev/core-dont-gen-json-uid-files
...
Core: Do not generate `*.uid` files for JSON, certificates, and translations
2024-12-04 11:02:09 -06:00
Thaddeus Crews
ab58a339df
Merge pull request #99712 from KoBeWi/bug_spawner_spawns_new_bugs_to_fix
...
Fix UID support in MultiplayerSpawner
2024-12-04 11:02:02 -06:00
Lukas Tenbrink
0d2e13bcb8
Optimize is_valid_filename and validate_filename by caching invalid filename characters, instead of re-splitting each call.
2024-12-04 17:54:11 +01:00
Danil Alexeev
b91bacb43a
Core: Do not generate `*.uid` files for JSON, certificates, and translations
2024-12-04 14:26:10 +03:00
kobewi
67b95f341e
Fix UID support in MultiplayerSpawner
2024-12-03 22:11:43 +01:00
Thaddeus Crews
44cda51110
Merge pull request #98812 from bruvzg/macos_bundles_as_file
...
[macOS] Handle bundles as files in the embedded file dialogs.
2024-12-03 14:41:07 -06:00
Thaddeus Crews
1719f8ed3d
Merge pull request #99834 from kiroxas/passLengthToParseUTF8
...
Ensure `parse_utf8` has length of string passed in when available
2024-12-03 14:41:06 -06:00
Thaddeus Crews
156bc92282
Merge pull request #98397 from adamscott/add-tmp-support
...
Add temp utilities (alias `OS::get_temp_dir()`, `FileAccess::create_temp()`, and `DirAccess::create_temp()`)
2024-12-03 14:40:59 -06:00
Thaddeus Crews
a135a6478a
Merge pull request #98383 from RandomShaper/deprecate_unsafe_th_rend
...
Deprecate the pointless unsafe threading model for rendering
2024-12-03 14:40:56 -06:00
bruvzg
d5e599f77e
[macOS] Handle bundles as files in the embedded file dialogs.
2024-12-03 12:41:52 +02:00
Adam Scott
1b3e483899
Add file and dir temporary utilities
...
Co-authored by @Alex2782 for the Android bindings.
Many thanks to the reviewers also.
Co-authored-by: Alex <alex.hart.278@gmail.com>
2024-12-02 12:08:14 -05:00
Rémi Verschelde
acdffd0a14
Merge pull request #99864 from HuntJSparra/server-features-regression
...
Fix `OS::has_feature()` skipping custom features
2024-12-02 15:51:56 +01:00
Rémi Verschelde
d7515dddaa
Merge pull request #99815 from Ivorforce/string-name-not-equal-inline
...
Move StringName `!=` operator to the header file to make it inlineable.
2024-12-02 15:51:43 +01:00
Lukas Tenbrink
2b39314461
Abstract the implementation of 3 ustring string length checks with strlen, adding an implementation for char32_t.
2024-12-02 15:19:20 +01:00
rune-scape
d58b2e879f
Get rid of easily removable uses of const_cast
2024-12-01 17:50:13 -08:00
Lukas Tenbrink
a47d29cf11
Move StringName != to the header file to make it inlineable.
2024-12-01 19:50:34 +01:00
Kiro
83d4bde0a2
When calling code has length of string, pass it to parse_utf8
2024-12-01 08:31:22 +01:00
Hunt J. Sparra
ba992ed22f
Fix early exit once has_server_feature_callback is set; remove server feature warning due to consistent "fallthrough" features (e.g., OS-specific features)
2024-11-29 23:34:52 -05:00
Rémi Verschelde
9048776457
Merge pull request #99751 from bruvzg/dir_init
...
Add `std::initializer_list` constructor for Dictionary.
2024-11-29 22:51:17 +01:00
bruvzg
a4b17e7852
[FileAccess] Return error codes from `store_*` methods.
2024-11-29 23:22:31 +02:00
Rémi Verschelde
56a7dba10b
Merge pull request #99799 from akien-mga/fix-typos
...
Fix various typos and code style issues
2024-11-29 22:02:53 +01:00
Rémi Verschelde
b1d65e4ed8
Merge pull request #99777 from Ivorforce/string-strlen-repeat-calls
...
String: Don't repeat calls to `strlen` in `split`, and make `splitter_length` const in `get_slice`.
2024-11-29 22:02:47 +01:00
Rémi Verschelde
f4f6f5fb55
Merge pull request #99537 from BlueCube3310/betsy-bc1-bc5
...
Betsy: Add BC3 and BC5 support
2024-11-29 22:02:06 +01:00
cixil
8a42e3d3ef
Avoid duplicating signals from scene instances into packed scenes
2024-11-29 18:29:08 +01:00
Pāvels Nadtočajevs
54945c4d28
Add std::initializer_list constructor for Dictionary.
2024-11-29 14:12:40 +02:00
Danil Alexeev
bd1a35ce9e
Core: Fix `JSON.{from,to}_native()` issues
2024-11-29 12:43:06 +03:00
Rémi Verschelde
88e81ee730
Fix various typos and code style issues
2024-11-28 17:40:42 +01:00
Lukas Tenbrink
884cbb5333
Don't repeat calls to strlen in split, and make splitter_length const in get_slice.
2024-11-28 01:55:48 +01:00
Thaddeus Crews
8b5f181d86
Merge pull request #90723 from Calinou/textedit-autocompletion-always-replace-if-not-shift
...
Make TextEdit autocompletion replace word unless Shift is held
2024-11-27 10:47:24 -06:00
BlueCube3310
88ffe07de9
Betsy: Add BC3 and BC5 support
2024-11-27 12:27:05 +01:00
Thaddeus Crews
13d59b28c1
Merge pull request #99563 from akien-mga/fix-projection-stringification
...
Fix stringification of Projection
2024-11-26 13:04:58 -06:00
Thaddeus Crews
0045b1a513
Merge pull request #98862 from HuntJSparra/early-projsettings-registration
...
Register Engine, OS, ProjectSettings, and Time singletons in time for for `INITIZATION_LEVEL_CORE`
2024-11-26 13:04:51 -06:00
Thaddeus Crews
7f3242a7e8
Merge pull request #99201 from Ivorforce/variant-get-contents-ptr
...
Add GDExtension `variant_get_ptr_internal_getter`, facilitating `VariantGetInternalPtr`-like behavior in GDExtension
2024-11-26 13:04:40 -06:00
Lukas Tenbrink
ffd4de67d0
Add variant_get_ptr_internal_getter to gdextension_interface.h. The function returns functions to retrieve a pointer to a Variant's internal value. This enables GDExtensions to implement functionality similar to VariantGetInternalPtr, to access Variant internal values directly.
2024-11-26 02:19:03 +01:00
Rémi Verschelde
f2f48aaf36
Fix stringification of Projection
2024-11-25 21:10:32 +01:00