1
0
Fork 0
Commit Graph

8656 Commits

Author SHA1 Message Date
Thaddeus Crews 0ce3d75c20
Merge pull request #93783 from aaronp64/json_stringify_performance
Improve `JSON::stringify` performance
2025-05-07 12:48:28 -05:00
Thaddeus Crews aa1ca2b244
Merge pull request #93517 from Repiteo/core/nodiscard-strings
Core: Add `[[nodiscard]]` to string-like classes/structs
2025-05-07 12:48:27 -05:00
aaronp64 f13b4b760a Improve JSON::stringify performance
- Changed stringify to call static function _stringify directly, instead of creating JSON object
- Changed colon and end_statement from String to const char * to avoid extra allocations in each _stringify call
- Pass result String reference to each _stringify call to append to instead of allocating new String in each call

These changes make JSON::stringify around 2-3x faster in most cases
2025-05-06 18:27:32 -04:00
aaronp64 1089f61868 Fix RandomPCG::random(int, int) overflow bug
- Use int64_t for subtraction before converting to uint32_t
- Don't add one to uint32_t max value for rand() bounds
2025-05-06 17:54:12 -04:00
Thaddeus Crews 579feb387c
Core: Add `[[nodiscard]]` to string-like classes 2025-05-06 12:23:41 -05:00
aaronp64 d176ba045f Array performance improvements to reduce copying/copy_on_write calls
- Avoid temporary copy of p_array in Array::append_array when types match
- Call ptrw() once before looping in methods that return new Arrays, to avoid copy_on_write call for each item (recursive_duplicate, slice, filter, map)
2025-05-06 13:19:50 -04:00
Lukas Tenbrink 26a6d4062d Inline `String::utf8` and `String::utf16` for their simplicity. 2025-05-06 17:20:03 +02:00
Thaddeus Crews e085acd71c
Merge pull request #104815 from Ivorforce/strnlen
Rename `_strlen_clipped` to `strnlen` (and use the system equivalent for `char *` inputs)
2025-05-06 08:38:06 -05:00
Thaddeus Crews bd22587170
Merge pull request #106093 from KoBeWi/deprecated_forever
Remove registration of deprecated classes
2025-05-06 08:38:05 -05:00
Thaddeus Crews 4cb030d6bf
Merge pull request #106089 from mihe/rogue-newlines
Fix empty lines being added for errors with no script backtrace
2025-05-06 08:38:04 -05:00
Thaddeus Crews 7efe897343
Merge pull request #106085 from clayjohn/texture-decompress-import
Fix loading BPTC/ASTC textures on devices that don't support them
2025-05-06 08:38:04 -05:00
Thaddeus Crews 5fec9a9fdc
Merge pull request #100057 from aaronp64/container_validate_obj_perf
Improve `ContainerTypeValidate` performance for object types
2025-05-06 08:38:03 -05:00
Thaddeus Crews aa24e3b671
Merge pull request #105884 from stuartcarnie/macos_embedded
macOS: Embedded window support.
2025-05-06 08:37:59 -05:00
Lukas Tenbrink ec32dae1da Rename `_strlen_clipped` to `strnlen` (and use the system equivalent for `char *` inputs).
Add `strnlen` for `char16_t *` and `wchar_t *`.
2025-05-06 15:17:07 +02:00
Stuart Carnie 00e1fdec2c MacOS: Embedded window support. 2025-05-06 06:09:05 +10:00
kobewi 242293c451 Remove registration of deprecated classes 2025-05-05 20:16:50 +02:00
Thaddeus Crews 5bc01f2994
Merge pull request #105080 from beicause/basisu-ktx2-settings
BasisU: Use KTX2 format and add import options to configure encoder
2025-05-05 11:24:20 -05:00
Thaddeus Crews 5aca298548
Merge pull request #106051 from dalexeev/move-alt-codes-from-char-range
Move `alt_code_oem437` and `alt_code_cp1252` to separate header file
2025-05-05 11:24:14 -05:00
Thaddeus Crews 743c1eed49
Merge pull request #106027 from aaronp64/string_format_perf
Reduce allocations/copies in `String::format`
2025-05-05 11:24:13 -05:00
Mikael Hermansson 31b90246e7 Fix empty lines being added for errors with no script backtrace 2025-05-05 13:27:21 +02:00
clayjohn 2b3923880a Continue checking for a texture decompression path even if end of import file is not reached 2025-05-05 00:19:32 -07:00
Danil Alexeev 413cb795cd
Move `alt_code_oem437` and `alt_code_cp1252` to separate header file 2025-05-03 11:52:49 +03:00
Alexander Hartmann cf00265386 Fix Xbox Controller on Android 2025-05-03 01:09:05 +02:00
LuoZhihao 237597b01f BasisU: Use KTX2 format and add import options to configure encoder 2025-05-03 01:45:38 +08:00
Lukas Tenbrink 1d49a557b6 Optimize away duplicate hash and position computation in `HashMap` on insert.
Co-authored-by: Nazarii <nazarii.yablonskyi.pp.2022@lpnu.ua>
2025-05-02 19:02:03 +02:00
aaronp64 a4ba8c37c9 Reduce allocations/copies in String::format
- Updated initial new_string copy to use copy constructor/increase ref count instead of copying to new allocated memory
- Removed Variant copies from Array before assigning to String
- Only convert i to String when needed
2025-05-02 12:32:11 -04:00
Danil Alexeev 2b30f23595
GDScript: Fix `Callable` call error text 2025-05-02 18:30:35 +03:00
Thaddeus Crews 01fc9aee6c
Core: Modernize C headers with C++ equivalents 2025-05-02 08:23:01 -05:00
Thaddeus Crews 9e9f6c9c35
Merge pull request #105916 from Repiteo/core/msvc-fastfail
Core: Use `__fastfail()` in MSVC error macros
2025-04-30 16:51:53 -05:00
Thaddeus Crews 304347c3ac
Merge pull request #104055 from Ivorforce/fixed-vector
Core: Add `FixedVector` template - a collection that can be used completely on the stack.
2025-04-30 16:51:53 -05:00
Thaddeus Crews baf9d6e150
Merge pull request #105871 from Ivorforce/quick-stringname-fixes
Quick `StringName` improvements.
2025-04-30 16:51:52 -05:00
Thaddeus Crews fb08e94c35
Merge pull request #105930 from a-johnston/fuzzy_search_index_field
Add original index field to fuzzy search result
2025-04-30 16:51:51 -05:00
Lukas Tenbrink 1b1ab76a14 Add `FixedVector` template.
This is a high performance `Vector`-like object that can be used if the maximum number of objects is small and known, and the objects are needed only temporarily.
2025-04-30 19:14:08 +02:00
Lukas Tenbrink 91362a61da Simplify `StringName` to `bool` conversions.
Move `mutex` include of `string_name.h` to `string_name.cpp`.
2025-04-30 16:59:34 +02:00
lawnjelly f8f350a32a Add `GLOBAL_GET` cached macros.
GLOBAL_GET is an expensive operation which should not be used each frame / tick.
This PR adds macros which do a cheaper revision check, and only call the expensive GLOBAL_GET when project settings have changed.

Co-authored-by: Lukas Tenbrink <lukas.tenbrink@gmail.com>
2025-04-30 15:08:50 +01:00
Adam Johnston e025c9ed11 Add original index field to fuzzy search result 2025-04-29 17:39:59 -07:00
Thaddeus Crews 60aae6d856
Merge pull request #86653 from Mickeon/string-format-error
Improve error message for `String.format` when using nested Arrays
2025-04-29 16:05:20 -05:00
Thaddeus Crews eb3d0604ba
Merge pull request #105876 from KoBeWi/dynamic_outline
Inline static variables (part 1)
2025-04-29 16:05:16 -05:00
Thaddeus Crews d849ebb776
Merge pull request #105896 from piiertho/enhancement/gdextension/fallback-to-default-get-property-state-when-not-overriden
Fallback to ScriptInstance::get_property_state when get_property_state is not implemented in ScriptInstanceExtension
2025-04-29 16:05:15 -05:00
Thaddeus Crews 347e51e077
Merge pull request #105922 from aaronp64/dictionary_has_all
Avoid extra copy/validation of keys in `Dictionary::has_all`
2025-04-29 16:05:14 -05:00
aaronp64 e4bd611e19 Avoid extra copy/validation of keys in Dictionary::has_all
Updated Dictionary::has_all to check its HashMap directly for each validated key instead of going through Dictionary::has, to avoid additional copy/validation of each key.
2025-04-29 15:27:12 -04:00
Thaddeus Crews b23a233b5b
Core: Use `__fastfail()` in MSVC error macros 2025-04-29 12:25:11 -05:00
kobewi 5af4bef46f Inline static variables (part 1) 2025-04-29 18:10:44 +02:00
Pierre-Thomas Meisels e8c036beeb Fallback to ScriptInstance::get_property_state when get_property_state is not implemented in ScriptInstanceExtension 2025-04-29 09:43:20 +02:00
Thaddeus Crews 44d20b2dc6
Merge pull request #100619 from Ivorforce/cowdata-resize-direct
Optimize / refactor `CowData`, combining resize and fork to avoid unnecessary reallocations.
2025-04-28 18:45:54 -05:00
Lukas Tenbrink e57427900f Use `BinaryMutex` instead of `Mutex` for `StringName`. 2025-04-28 17:13:26 +02:00
Thaddeus Crews b7d4426fff
Merge pull request #104269 from lawnjelly/fti_scene_tree4
Physics Interpolation - Move 3D FTI to `SceneTree`
2025-04-28 10:01:34 -05:00
Thaddeus Crews 751ef44a13
Merge pull request #87714 from KoBeWi/hack_uid()
Expose `set_uid()`
2025-04-28 10:01:30 -05:00
Lukas Tenbrink f064a415b3 Use `PagedAllocator` for `StringName` to accelerate and localize allocations. 2025-04-28 10:38:17 +02:00
kobewi 6f4cf04fb8 Expose set_uid() 2025-04-28 10:13:43 +02:00
Pāvels Nadtočajevs 03048aa94a
Improve edited scene layout direction detection. 2025-04-28 07:57:26 +03:00
Thaddeus Crews f8a8d6cf04
Merge pull request #105700 from dementive/config-file-get-improvement
Improve ConfigFile get_sections and get_section_keys by returning Vector<String>
2025-04-27 19:21:31 -05:00
Thaddeus Crews 74fc4dae15
Merge pull request #95585 from HolonProduction/remove-cache
ScriptEditor: Remove obsolete completion cache
2025-04-27 19:21:30 -05:00
Thaddeus Crews 18f5b668d7
Merge pull request #105817 from Ivorforce/extension-loader-gdclass-fix
Fix `GDExtensionLoader` using the wrong super type in `GDSOFTCLASS`.
2025-04-27 19:21:29 -05:00
Thaddeus Crews df78d4a866
Merge pull request #105546 from Splizard/fix_gdextension_tostring
Fix GDExtension `Object/Node::to_string` to check `is_valid` before returning the result
2025-04-27 19:21:24 -05:00
Thaddeus Crews 1a2a1b07df
Merge pull request #105799 from Repiteo/scons/enum-conversion-warnings
SCons: Add enum conversion warning
2025-04-27 19:21:23 -05:00
Thaddeus Crews 3947cbe3b2
Merge pull request #104386 from Repiteo/core/cpp-math
Core: Replace C math headers with C++ equivalents
2025-04-27 19:21:22 -05:00
Thaddeus Crews ba0ad482ec
Merge pull request #105760 from Ivorforce/string-name-encapsulate
Remove unnecessary `StringName` `idx` cache in `_Data` to reduce its size.
2025-04-27 19:21:15 -05:00
Thaddeus Crews 999294d77a
Core: Integrate `CharStringT` 2025-04-27 09:58:39 -05:00
Lukas Tenbrink f2bab45202 Fix `GDExtensionLoader` using the wrong super type in `GDSOFTCLASS`. 2025-04-27 10:28:08 +02:00
HolonProduction 56bad11517 ScriptEditor: Remove obsolete completion cache 2025-04-26 22:59:10 +02:00
Thaddeus Crews dc9c34f0c6
SCons: Add enum conversion warning 2025-04-26 12:06:20 -05:00
lawnjelly ae04a3a5dd Physics Interpolation - Move 3D FTI to `SceneTree`
Moves 3D interpolation from server to the client code (`SceneTree`).
Complete rework of 3D physics interpolation, but using the same user API.
2025-04-26 14:13:30 +01:00
Thaddeus Crews e37c6261ea
Merge pull request #105767 from Ivorforce/no-alloc-count
Optimize static allocations by removing unused `Memory::alloc_count`.
2025-04-25 18:25:32 -05:00
Lukas Tenbrink af7610576a Remove unused `Memory::alloc_count`. 2025-04-25 21:44:26 +02:00
Lukas Tenbrink 3b31636985 Remove unnecessary `StringName` `idx` cache in `_Data` to reduce its size by 4 bytes.
Encapsulate `StringName` details in its cpp file.
2025-04-25 19:22:29 +02:00
Thaddeus Crews 5c9f93ce03
SCons: Begin decoupling generation & build code 2025-04-25 08:23:01 -05:00
dementive b8e44a0000 Improve ConfigFile get_sections and get_section_keys by returning Vector<String> 2025-04-24 20:10:31 -04:00
Thaddeus Crews 28089c40c1
Merge pull request #91006 from reduz/live-backtrace
Ability to print and log script backtraces
2025-04-24 17:18:52 -05:00
Thaddeus Crews ca4038f22a
Merge pull request #103336 from dugramen/projecsetting-override-order
Keep ProjectSettings overrides right below the original setting
2025-04-24 17:18:46 -05:00
Lukas Tenbrink d74ef8cb01 Rename `LocalVector.invert()` -> `LocalVector.reverse()` to match the `Vector`, `String` and `List` APIs. 2025-04-24 22:36:32 +02:00
dugramen 3354c32984 Keep ProjectSettings overrides right below the original setting 2025-04-24 15:00:40 -04:00
reduz d1dcb40d56 Ability to print and log script backtraces
Co-authored-by: Mikael Hermansson <mikael@hermansson.io>
2025-04-24 18:54:41 +02:00
Dynamic-Pistol c8fed1e1d0 Add PROPERTY_HINT_INPUT_NAME
Added PROPERTY_HINT_INPUT_NAME for StringName based off https://github.com/godotengine/godot-proposals/discussions/7559
2025-04-23 22:23:44 +02:00
Thaddeus Crews 931820d33c
Merge pull request #105278 from Ivorforce/reserve-smoke-test
Smoke test: Log an error if `reserve()` is called with fewer elements than `size()`
2025-04-23 12:01:28 -05:00
Thaddeus Crews 841c29d62c
Merge pull request #104985 from Ivorforce/stringname-always-string
Always use `String` as `StringName` backing internally.
2025-04-23 12:01:27 -05:00
Lukas Tenbrink 7c37188ca1 Smoke test: In collections, log an error if `reserve()` is called with a number smaller than the current size. Don't log an error if it is called with a number smaller than the current capacity. 2025-04-23 16:47:47 +02:00
RedMser a96e8ac62c Remove old path remaps system
Unused in public repositories, deprecated for over 6 years, and the
replacement system is well-tested by now.
2025-04-23 15:48:33 +02:00
Lukas Tenbrink 91fe434a86 Always use `String` as `StringName` backing internally. 2025-04-23 14:57:03 +02:00
Thaddeus Crews 2ffd5a3913
Merge pull request #104738 from YYF233333/cleanup_rid_owner
Use `LocalVector` in `RID_Owner::get_owned_list`
2025-04-22 10:44:25 -05:00
Thaddeus Crews c0e695d5e8
Merge pull request #100944 from Nazarwadim/LocalVector_use_1.5x_growth_factor
Use 1.5x growth factor for LocalVector
2025-04-21 08:24:22 -05:00
Thaddeus Crews 6c35474568
Merge pull request #105538 from clayjohn/rid_owner-validation
Remove 2^31 cap on RID allocations
2025-04-21 08:24:21 -05:00
Thaddeus Crews 0cc292f880
Merge pull request #105272 from lodetrick/add_section_toggle
Add enable checkboxes to editor sections
2025-04-21 08:24:20 -05:00
Yyf2333 1a70a06a43 Change RID_Owner::get_owned_list. 2025-04-21 01:04:27 +08:00
Quentin Quaadgras 23ffdd79e8 fix gdextension Object/Node::to_string to check is_valid before returning the result
at best, this results in an empty string, at worst, the result is never
initialised when is_valid is false.
2025-04-19 10:45:12 +12:00
clayjohn c6c06a966a Allow chunk validator to wrap around in RID_Alloc so that we do not need to crash once we have made 2^31 allocations 2025-04-18 00:06:53 -07:00
Thaddeus Crews ad40939b6f
Core: Replace C math headers with C++ equivalents
- Minor restructuring to ensure `math_funcs.h` is the central point for math functions
2025-04-16 15:49:02 -05:00
Thaddeus Crews c5c1cd4440
Merge pull request #105453 from reduz/signals-thread-safe
Add thread safety to Object signals
2025-04-16 15:39:22 -05:00
Marc Gilleron 5e6df6a196 Use Math::abs to avoid ambiguity with integer abs 2025-04-16 20:41:36 +02:00
Juan 2f39d8ebef Add thread safety to Object signals
* It turns out the majority of this work was done already by AThousandShips as part of #89451. This allows to do lock-less emitting of signals.
* This means, that only the signal map needs to be protected, making the task simple and without risk of deadlocks, or affecting performance.
* Objects can choose to not protect signals for performance (as example Node uses thread guards for protection, so these signals are not thread safe).
2025-04-16 17:14:44 +02:00
cier ebe9370724 Add enable checkboxes to editor sections
Fixes https://github.com/godotengine/godot-proposals/issues/4173
2025-04-15 13:49:41 -07:00
Thaddeus Crews 86b1fc7205
Merge pull request #104774 from Cykyrios/fix-center-bbcode-ansi-tag
Add missing "/" to "center" tag in `__print_line_rich()`
2025-04-15 12:28:44 -05:00
Thaddeus Crews 29dcead192
Merge pull request #105394 from Zylann/quaternion_abs
Use Math::abs to avoid ambiguity with integer abs
2025-04-15 12:28:41 -05:00
Thaddeus Crews b8950a4662
Merge pull request #105392 from aaronp64/array_min_max
Optimize `Array` `min`/`max` methods
2025-04-15 12:28:40 -05:00
Lukas Tenbrink 015a3b0434 Optimize / refactor `CowData`, combining `resize` and `fork` to avoid unnecessary reallocations. 2025-04-15 17:01:26 +02:00
Thaddeus Crews e5ccaa79e2
Merge pull request #105334 from WindyDarian/insert_at_end
Allow inserting at end of array again
2025-04-14 19:39:54 -05:00
Thaddeus Crews 034e614f10
Merge pull request #105326 from basicer/fix-unused-paramater-warning
Supress unused paramater warning conflicting with if constexpr
2025-04-14 19:39:52 -05:00
Thaddeus Crews 3d80279f80
Merge pull request #90971 from billuo/string-format-rid
Fix `RID` cannot be string formatted
2025-04-14 19:39:50 -05:00
Thaddeus Crews f56a4d4fe4
Merge pull request #105138 from stuartcarnie/fix_hangs
Renderer: Reduce scope of mutex locks to prevent common deadlocks
2025-04-14 19:39:47 -05:00
Thaddeus Crews 53608e3376
Merge pull request #104239 from Ivorforce/optimize-undenormalize
Optimize reverb by removing stray `volatile` from the `undenormalize` function signature.
2025-04-14 19:39:46 -05:00
Thaddeus Crews af252823ac
Merge pull request #101291 from Ivorforce/stringname-to-bool
Change `StringName.operator const void *` to `explicit operator bool`.
2025-04-14 19:39:45 -05:00
Thaddeus Crews e2b6a45e8d
Merge pull request #105247 from bruvzg/fix_nested_bbcode
Fix BBCode print with nested `[`.
2025-04-14 19:39:43 -05:00
Marc Gilleron 40b5468c6d Use Math::abs to avoid ambiguity with integer abs 2025-04-14 23:54:07 +02:00
aaronp64 ecf63dd079 Optimize Array min/max methods
Updated Array::min and Array::max to not copy Variants for comparison, and store index instead of copying each time new min/max is found.
2025-04-14 15:40:06 -04:00
Marc Gilleron ab36db2cfa Print Godot version when an extension is found to be incompatible 2025-04-13 14:14:23 +02:00
Windy Darian effd1b71ce allow inserting at end of array again 2025-04-12 22:16:19 -04:00
Stuart Carnie 09282c316a Renderer: Reduce scope of mutex locks to prevent common deadlocks
Fixes #102877
2025-04-13 06:56:13 +10:00
Rob Blanckaert 88a43b7039 Supress unused paramater warning conflicting with if constexpr 2025-04-12 13:18:12 -07:00
Thaddeus Crews addab4f001
Merge pull request #95916 from Repiteo/core/bit-field
Core: Add dedicated `BitField` template
2025-04-11 13:29:13 -05:00
Thaddeus Crews 0d267e7b1e
Core: Add dedicated `BitField` template 2025-04-11 11:53:26 -05:00
Lukas Tenbrink e989d7bd89 Change `StringName.operator const void *` to `explicit operator bool`. 2025-04-11 18:34:01 +02:00
Lukas Tenbrink b711d72e8f Remove unnecessary `friend class` declarations of `CowData`.
Use default implementations for various containers.
2025-04-11 18:26:08 +02:00
Thaddeus Crews d236bd8633
Merge pull request #99543 from KoBeWi/using_rng_to_destroy_rng
Add `create_id_for_path()` to ResourceUID
2025-04-11 09:51:12 -05:00
Thaddeus Crews 4972a524fc
Merge pull request #96139 from Alex2782/reverting_pr_84331
Add configuration option to disable `Scroll Deadzone` on Android
2025-04-11 09:51:08 -05:00
Thaddeus Crews 0964badc05
Merge pull request #105210 from nikitalita/gdsoftclass-fa-da
Add GDSOFTCLASS to FileAccess and DirAccess derived classes
2025-04-11 09:51:08 -05:00
Thaddeus Crews 717df3ee88
Merge pull request #105249 from Repiteo/core/math-defs-namespace
Core: Use `Math` namespace for constants
2025-04-11 09:51:04 -05:00
kobewi ff1f040893 Add create_id_for_path() to ResourceUID 2025-04-11 00:53:34 +02:00
Thaddeus Crews 297650a912
Merge pull request #93466 from bruvzg/alt_oem
[TextEdit / LineEdit] Add support for OEM Alt codes input.
2025-04-10 16:53:46 -05:00
Thaddeus Crews 31bb3be5a6
Merge pull request #105145 from bruvzg/swap_pba
Add bswap methods to the `PackedByteArray` bindings.
2025-04-10 16:53:46 -05:00
Thaddeus Crews 94282d88f9
Core: Use `Math` namespace for constants 2025-04-10 16:29:30 -05:00
Priahoud bf963e767e Add Options, Functions and Settings to convert Node-Names and Strings to kebab-case
- refactored and renamed String::_camelcase_to_underscore to String:_separate_compound_words
- refactored String::to_snake_case to work with the refactored String::_separate_compound_words
- created char_utils::is_hyphen to catch all hyphen variants in kebab-case conversion
- created String::to_kebab_case using the new String::_separate_compound_words
- created corresponding Documentation in String and StringName
- simplified both switch statements in EditorNode and ProjectDialog
- added new kebab-casing Option for Node Names in ProjectSettings
- added missing camelCase Options to Scene- and Node-Names in ProjectSettings
- simplified Mono RuntimeInterop Functions
- hooked up the ConnectionsDialog
- created additional Unit Tests
2025-04-10 21:22:21 +02:00
Pāvels Nadtočajevs bd3a264011
Fix BBCode print with nested `[`. 2025-04-10 19:53:12 +03:00
Thaddeus Crews c67b9a43e3
Merge pull request #100086 from erodozer/multipart-ext-import
Support multi dot extensions in import plugins
2025-04-10 10:18:18 -05:00
Thaddeus Crews cade15a163
Merge pull request #92475 from AThousandShips/string_replace_char
Add `String::replace_char(s)` methods for performance and convenience
2025-04-10 10:18:16 -05:00
Thaddeus Crews fc1dbda769
Merge pull request #105164 from stuartcarnie/apple_pthread
Apple: Add pthread implementation of `Thread` class
2025-04-10 10:18:12 -05:00
A Thousand Ships 889410dcda
Add `String::replace_char(s)` methods for performance and convenience 2025-04-10 13:08:45 +02:00
bruvzg aa0ade5b49
[TextEdit / LineEdit] Add support for OEM Alt codes input. 2025-04-10 08:52:19 +03:00
Stuart Carnie 8c8d6de3e7 Apple: Add pthread implementation of `Thread` class
This allows Apple platforms to override the default stack size of
a thread in the WorkerThreadPool, which is 512KiB by default.

This must be increased, as SPIRV-Cross, used by the Metal driver, can
use deeply nested stacks, as can debug builds.
2025-04-10 09:35:40 +10:00
Thaddeus Crews 7b74eb1a9b
Merge pull request #105205 from aaronp64/dictionary_has_validated_key
Use validated key in `Dictionary::has`
2025-04-09 18:12:02 -05:00
Thaddeus Crews 7a6c3b309f
Merge pull request #105130 from bruvzg/uri_fix_plus
Add uri_file_decode to handle + in file names.
2025-04-09 18:11:56 -05:00
nikitalita 2d0ae77719 add GDSOFTCLASS to FileAccess and DirAccess derived classes 2025-04-09 11:52:50 -07:00
aaronp64 117b1c3da1 Use validated key in Dictionary::has
Updated Dictionary::has to use validated key when checking variant_map, to handle cases when passed in key is converted to Dictionary's key type.
2025-04-09 12:22:48 -04:00
Pāvels Nadtočajevs 7c4d45ba3b
Add bswap methods to the `PackedByteArray` bindings. 2025-04-09 18:51:50 +03:00
Thaddeus Crews a8598cd8e2
Merge pull request #71542 from bruvzg/export_project_settings
[Export] Use project settings overrides with the target preset features instead of current platform features.
2025-04-09 08:51:47 -05:00
Thaddeus Crews ec675fc329
Merge pull request #100333 from YYF233333/reduce_list
Use `LocalVector` instead of `List` as arg of `Dictionary::get_key_list`
2025-04-09 08:51:45 -05:00
Thaddeus Crews 4c02239c5f
Merge pull request #105180 from bruvzg/thread_crash
Fix Thread crash when using invalid callback signature. And invalid message formatting.
2025-04-09 08:51:43 -05:00
Thaddeus Crews 217d1c6d2f
Merge pull request #105178 from bruvzg/endianess_notes
Remove misleading and incorrect notes about endianness. Fix FileAccess and StreamPeer not doing what name suggests.
2025-04-09 08:51:42 -05:00
Thaddeus Crews e6b2a42053
Merge pull request #83027 from rarysson/array-negative-indexes
Add negative index to `Array.remove_at` and `Array.insert`
2025-04-09 08:51:40 -05:00
Thaddeus Crews 0563f4f978
Merge pull request #105166 from Ivorforce/get-class-static-stringname
Change `get_class_static` to return `StringName`.
2025-04-09 08:51:39 -05:00
Thaddeus Crews e764068e99
Merge pull request #105159 from adamscott/define_my_int
Move `THREADS_ENABLED` check after common imports
2025-04-09 08:51:38 -05:00
Pāvels Nadtočajevs 41a87f06e1
Fix Thread crash when using invalid callback signature. And invalid message formatting. 2025-04-09 11:57:25 +03:00
Pāvels Nadtočajevs bd98aad3fa
Remove misleading and incorrect notes about endianness. Fix FileAccess and StreamPeer not doing what name suggests. 2025-04-09 11:01:25 +03:00
Lukas Tenbrink fbe64ffb45 Change `get_class_static` to return `StringName`.
Use that static `get_class_static` for `_get_class_namev` to avoid duplication.
2025-04-08 23:25:05 +02:00
Yufeng Ying f7e4987d0e Dictionary::get_key_list use LocalVector instead of List. 2025-04-09 02:46:24 +08:00
Adam Scott b7402b7597
Move `THREADS_ENABLED` check after common imports 2025-04-08 14:24:13 -04:00
bruvzg c6739f64df
[Export] Use project settings overrides with the target preset features instead of current platform features. 2025-04-08 21:22:37 +03:00
Rarysson Guilherme fe39ffeb7d Add negative index to `Array.remove_at` and `Array.insert` 2025-04-08 14:55:39 -03:00
Thaddeus Crews 36991aba34
Merge pull request #104264 from YYF233333/layout/gdvirtual
Optimize gdvirtual function layout
2025-04-08 12:32:51 -05:00
Thaddeus Crews 80e7f1a6d7
Merge pull request #105144 from Ivorforce/file-access-crompressed-size
Fix `FileAccessCompressed` claiming one byte more than it actually has.
2025-04-08 12:32:49 -05:00
Thaddeus Crews e6a61b1ecc
Merge pull request #76829 from bruvzg/ac_kit_direct
Implement screen reader support using AccessKit library.
2025-04-08 12:32:47 -05:00
Thaddeus Crews 6fe4d8d0f8
Merge pull request #104082 from YYF233333/dict_iter
Do not iterate `Dictionary` with `get_key_at_index`
2025-04-08 12:32:45 -05:00
Thaddeus Crews 95dc68c8c6
Merge pull request #105107 from bruvzg/min-max-flag
Add separate `minimize_disabled` and `maximize_disabled` window flags.
2025-04-08 12:32:44 -05:00
Thaddeus Crews 5dc7d56b92
Merge pull request #105099 from Ivorforce/object-classname-cache
Fix caching of objects' class name pointer in `Object` instances.
2025-04-08 12:32:40 -05:00
Pāvels Nadtočajevs b106dfd4f9
Base accessibility API. 2025-04-08 20:14:28 +03:00
Lukas Tenbrink 68f4502a5b Fix `FileAccessCompressed` claiming one byte more than it actually has.
Add a unit test for fastlz compressed file access.
2025-04-08 15:19:58 +02:00
Pāvels Nadtočajevs 9abe2e5294
Add `uri_file_decode` to handle `+` in file names. 2025-04-07 23:49:17 +03:00
Alex cd68034e01 Add configuration option to disable `Scroll Deadzone` on Android 2025-04-07 22:15:31 +02:00
Lukas Tenbrink e7f087b91a Fix caching of objects' class name pointer in `Object` instances.
Use `get_class_name` for `get_class` calls. Merge `get_parent_class_static` into `get_class_static`.
2025-04-07 21:05:21 +02:00
Pāvels Nadtočajevs f37fb49739
Add separate `minimize_disabled` and `maximize_disabled` window flags. 2025-04-07 18:58:11 +03:00
Yufeng Ying bbc380b07e Do not iterate Dictionary with get_key_at_index. 2025-04-07 21:54:13 +08:00
Thaddeus Crews 0fbb22c095
Merge pull request #104432 from YYF233333/dict_iter2
Do not iterate `Dictionary` with `Dictionary::keys()`
2025-04-07 08:43:33 -05:00
Thaddeus Crews 45a64319e1
Merge pull request #104771 from Repiteo/ci/pre-commit-bump
CI: Bump various pre-commit hooks
2025-04-07 08:43:27 -05:00
Thaddeus Crews 4a3c8a5c58
Merge pull request #104897 from MewPurPur/optimize-color-from-string
Optimize Color.html()
2025-04-07 08:43:26 -05:00
Thaddeus Crews b9665b9ee9
Merge pull request #104991 from nikitalita/fix_inf_neg
`VariantWriter::write`: fix writing negative infinity when `p_compat` is true
2025-04-07 08:43:21 -05:00
Thaddeus Crews 5edb235018
CI: Bump various pre-commit hooks 2025-04-07 08:23:35 -05:00
Thaddeus Crews 8a93218aab
Core: Natively convert enum/BitField with Variant 2025-04-05 12:35:34 -05:00
MewPurPur 45b1071e7c Optimize Color.html() 2025-04-05 14:00:30 +03:00
Yufeng Ying 8ae16699c5 Do not use Dictionary::keys() for Dictionary iteration. 2025-04-05 18:42:13 +08:00
Thaddeus Crews 4b36c0491e
Merge pull request #105020 from YYF233333/opt_get_inheriters
Optimize `ClassDB::get_inheriters_from_class`
2025-04-04 17:40:59 -05:00
Thaddeus Crews 046c9f540c
Merge pull request #105030 from Ivorforce/class-is-enabled-object
Move `GD_IS_CLASS_ENABLED` and respective include from `class_db.h` to `object.h`, as this is where it's needed.
2025-04-04 17:40:58 -05:00
Lukas Tenbrink aa5ca4f1a2 Move `GD_IS_CLASS_ENABLED` and respective include from `class_db.h` to `object.h`, as this is where it's needed. 2025-04-04 23:45:35 +02:00
Thaddeus Crews 78922d756a
Core: Decouple `GDCLASS` from ClassDB 2025-04-04 16:21:30 -05:00
Yufeng Ying 4029051bb1 Change ClassDB::get_inheriters_from_class. 2025-04-04 23:47:19 +08:00
Yufeng Ying 057858a0fb Optimize gdvirtual layout.
Co-authored-by: David Snopek <dsnopek@gmail.com>
2025-04-04 22:54:42 +08:00
runzh-crypto 9977abd697 Validate custom directory when project is started 2025-04-04 21:21:42 +08:00
Thaddeus Crews 21db8487a2
Merge pull request #104664 from tomfull123/missing-typed-dictionary-initializer-list
Add missing `initializer_list` constructor to TypedDictionary
2025-04-03 16:50:23 -05:00
Thaddeus Crews 6bd249a4c2
Merge pull request #104850 from Repiteo/core/warning-macros
Core: Integrate warning suppression macro helpers
2025-04-03 16:50:22 -05:00
nikitalita 046651e729 `VariantWriter::write`: fix writing negative infinity when p_compat is true 2025-04-03 14:36:34 -07:00
Lukas Tenbrink e6d166344b Remove unused `get_inheritance_list_static` from `GDCLASS`. 2025-04-03 17:18:28 +02:00
Thaddeus Crews 207a2b6472
Core: Integrate warning suppression macro helpers 2025-04-03 10:13:46 -05:00
Thaddeus Crews d0b3e0b474
Merge pull request #104921 from Ivorforce/no-get-valid-parents
Remove unused `get_valid_parents_static` functions from `GDCLASS`.
2025-04-03 09:27:54 -05:00
Thaddeus Crews e5c5cb4ce2
Merge pull request #104906 from Daylily-Zeleen/daylily-zeleen/allow_instantiate_unexposed_editor_plugin_from_gdextension
Allow instantiating unexposed `EditorPlugin` from GDExtension.
2025-04-03 09:27:50 -05:00
Rémi Verschelde 35beb07eef
CryptoCore: Use size_t for buffer sizes to fix encoding/sums of 2.0+ GiB files.
Fixes #104949.
2025-04-03 11:29:59 +02:00
Tom 8a3f9846c5 Add missing initializer_list constructor for TypedDictionary 2025-04-03 00:17:44 +01:00
Daylily-Zeleen 1cc879afc0 Allow instantiate unexposed EditorPlugin form GDExtension. 2025-04-02 23:52:14 +08:00
Thaddeus Crews 1f56d96cf2
Merge pull request #104893 from Repiteo/scons/external-includes-alt
SCons: Add `CPPEXTPATH` for external includes
2025-04-02 07:48:03 -05:00
Thaddeus Crews 9f222d500d
Merge pull request #104375 from YYF233333/is_empty
Replace `size() == 0` with `is_empty()`
2025-04-02 07:37:31 -05:00
Thaddeus Crews f25fc34439
SCons: Add `CPPEXTPATH` for external includes 2025-04-02 07:29:08 -05:00
Lukas Tenbrink be82731f99 Removed unused `get_valid_parents_static` functions from `GDCLASS`. 2025-04-02 13:50:47 +02:00
Yufeng Ying 7a1a970c25 size() <= 0 and size() < 1. 2025-04-02 19:18:44 +08:00
Yufeng Ying 4f4031a675 Replace size() == 0 with is_empty(). 2025-04-02 19:18:43 +08:00
smix8 f2197a1013 Expose TriangleMesh api functions wrapped for scripting
Adds script wrapped TriangleMesh api functions to create and query the triangle BVH tree.
2025-04-02 09:52:35 +02:00
Thaddeus Crews 1f1b1c56e7
Merge pull request #104381 from Ivorforce/object-notification-nobool
Optimize `Object::notification` by avoiding runtime branches
2025-04-01 19:53:37 -05:00
Thaddeus Crews 92002b1c69
Merge pull request #104218 from zaevi/fix_OptimizedTranslation_hash
Fix hash issue with OptimizedTranslation caused by signed char
2025-04-01 19:53:37 -05:00
Thaddeus Crews 21956851ac
Merge pull request #104885 from MewPurPur/html-validation-optimization
Optimize Color HTML validation
2025-04-01 19:53:32 -05:00
MewPurPur 250cc58388 Optimize HTML color validation 2025-04-01 21:26:21 +03:00
Michael Alexsander 556933306a
Allow to compile templates without navigation features 2025-04-01 11:53:35 -03:00
Lukas Tenbrink 8a76e31547 Remove bool from `Object::notification` virtual function; replace with separate functions to avoid branching. 2025-04-01 15:26:32 +02:00
Thaddeus Crews d52b84e472
Merge pull request #103993 from aaronfranke/geometry-segment
Directly use segment points in Geometry2D/3D function parameters
2025-04-01 08:01:34 -05:00
Thaddeus Crews abd565eb19
Merge pull request #104844 from Ivorforce/gdsoftclass
Add and require `GDSOFTCLASS` for `Object` subclasses that want to cast but do not use `GDCLASS`.
2025-03-31 19:02:03 -05:00
Lukas Tenbrink fa0a3c9c6e Add and require `GDSOFTCLASS` for `Object` subclasses that want to cast but do not use `GDCLASS`. 2025-03-31 20:49:50 +02:00
Thaddeus Crews 8f6bb119f4
Merge pull request #100602 from KoBeWi/over_100_changes_in_50_random_files_aka_the_best_kind_of_PR
Add templated version of `ObjectDB::get_instance()`
2025-03-31 12:03:47 -05:00
Thaddeus Crews f704113abe
Merge pull request #104649 from Ivorforce/move-semantics-ref-array-dict
Add move semantics to `Ref`
2025-03-31 12:03:44 -05:00
Thaddeus Crews 64f80ca0e9
Merge pull request #104810 from kiroxas/utf8_cleanup
Replace `append_utfx` with direct `String::utfx`
2025-03-31 12:03:44 -05:00
Lukas Tenbrink ccdc5862e9 Add `LocalVector.erase_unordered`, mimicking `erase` but with `remove_at_unordered`, to remove duplicate logic.
`erase_unordered` should be preferred over `erase` where order is not important, for its performance benefits.

Co-authored-by: smix8 <smix8@users.noreply.github.com>
2025-03-31 13:31:53 +02:00
Aaron Franke c1acc839a8
Directly use segment points in Geometry2D/3D function parameters 2025-03-30 16:25:59 -07:00
Kiro 23129a66ed Replace append_utfx with direct String::utfx 2025-03-30 19:56:38 +02:00
Thaddeus Crews 3b1a481f13
Merge pull request #97843 from detomon/optimize-a-star-grid-2d-solve
Reduce allocations when solving path in `AStarGrid2D`
2025-03-30 09:06:02 -05:00
Thaddeus Crews 6fed7a3000
Merge pull request #104745 from BlueCube3310/rgb565-typo-fix
Image: Fix typo at `_set_color_at_ofs` with `FORMAT_RGB565`
2025-03-30 09:06:01 -05:00
Thaddeus Crews 8b2952a71c
Merge pull request #101504 from AThousandShips/nav_split_new
[Navigation] Create a dedicated 2D navigation server
2025-03-30 09:05:43 -05:00
Cyril B. de5c1f9707 Add missing / for center tag in __print_line_rich 2025-03-29 20:21:31 +01:00
BlueCube3310 647b99c6d0 Image: Fix typo at `_set_color_at_ofs` with `FORMAT_RGB565` 2025-03-29 17:51:31 +01:00
Thaddeus Crews 152c14b053
Merge pull request #104597 from bruvzg/path_check
Implement `DirAccess.is_equivalent` method.
2025-03-29 10:16:34 -05:00
Thaddeus Crews 780cf03051
Merge pull request #104556 from Ivorforce/string-extend-instead-of-parse
Use `append_` instead of `parse_` for `String` methods.
2025-03-29 10:16:33 -05:00
Thaddeus Crews 6bab3c07fc
Merge pull request #104746 from zaevi/fix_color_html
Fix reversed hex order in `Color::to_html`
2025-03-29 10:16:32 -05:00
A Thousand Ships 5cc0539961
[Navigation] Create a dedicated 2D navigation server
* Add a dedicated 2D server
* Create dedicated tests
* Split performance metrics between 2D and 3D
* Rename the 3D only server module
2025-03-29 12:10:50 +01:00
Zae e7f7823236 Fix reversed hex order in `Color::to_html` 2025-03-29 06:06:09 +08:00
BlueCube3310 dd47d9173e Image: Improve `is_invisible` function 2025-03-28 22:42:37 +01:00
Rémi Verschelde afc7398c2b
Merge pull request #104616 from ibrahn/init-cmd-q-pending-and-gles3-skymatdata
Fix uninitialized member vars in CommandQueueMT and RasterizerSceneGLES3
2025-03-28 17:30:37 +01:00
Rémi Verschelde e3063f5675
Merge pull request #104590 from bruvzg/tex_decomp_load
Load decompressable texture format if no supported one is found.
2025-03-28 17:30:28 +01:00
Rémi Verschelde e8bc75f056
Merge pull request #103373 from YeldhamDev/build_remove_physics
Allow to compile templates without physics servers
2025-03-28 17:30:03 +01:00
Rémi Verschelde be1333dc0a
Merge pull request #97002 from bruvzg/mbchar_iconv
Add methods to decode/encode multibyte encodings.
2025-03-28 17:29:47 +01:00
Rémi Verschelde 3b90bb56ad
Merge pull request #89782 from KoBeWi/stdArrayList
Use initializer list in Arrays
2025-03-28 17:29:40 +01:00
bruvzg 48bfe13e4f
Add methods to decode/encode multibyte encodings. 2025-03-28 17:32:34 +02:00
Michael Alexsander 5ad414d046
Allow to compile templates without physics servers 2025-03-28 11:00:44 -03:00
Rémi Verschelde 3fe69cdf74
Merge pull request #104698 from bruvzg/loc_dir
Fix editor layout direction change on translation change.
2025-03-28 14:34:52 +01:00
Rémi Verschelde 4a31936bc1
Merge pull request #104693 from mihe/local-vector-move
Optimize `LocalVector::push_back` for non-trivial objects
2025-03-28 14:34:49 +01:00
Rémi Verschelde d8a81e416e
Merge pull request #104668 from monxa/redundant-lock-declaration
Remove redundant `ClassDB::locker` declaration
2025-03-28 14:33:45 +01:00
Rémi Verschelde 10799d0b44
Merge pull request #104389 from Ivorforce/color-string-append
Optimize `Color::to_html` by allocating less.
2025-03-28 14:32:54 +01:00
Rémi Verschelde 76c30189fa
Merge pull request #103923 from Ivorforce/span-array-init
Add C array constructor to `Span`.
2025-03-28 14:32:14 +01:00
Rémi Verschelde d01ffe4ad2
Merge pull request #103708 from Ivorforce/linear-casts-fast-virtual-casts-bad
Optimize `Object::cast_to` by assuming no virtual and multiple inheritance, gaining 7x throughput over `dynamic_cast`.
2025-03-28 14:32:04 +01:00
Rémi Verschelde 666edb3f76
Merge pull request #102440 from dsnopek/classdb-cannot-instantiate-unexposed-classes
Prevent instantiating classes that aren't exposed
2025-03-28 14:31:46 +01:00
Rémi Verschelde e81eb3f1e9
Merge pull request #102354 from YYF233333/style_iterator
Use iterator pattern instead of manually traverse `List::Element *`
2025-03-28 14:31:40 +01:00
Rémi Verschelde 4e1e99142d
Merge pull request #102126 from Ivorforce/optimize-get_setting_with_override
Optimize `ProjectSettings::get_setting_with_override` / `GLOBAL_GET` by avoiding repeated dict lookups.
2025-03-28 14:31:36 +01:00
Rémi Verschelde 17a8f58a51
Merge pull request #100754 from BlueCube3310/image-cleanup-v4
Image: Remove references to defunct `FORMAT_CUSTOM`
2025-03-28 14:31:27 +01:00
Rémi Verschelde ecda77959c
Merge pull request #99590 from Calinou/version-double-build-name
Add `double` to the version full build string when using a double-precision build
2025-03-28 14:31:23 +01:00
Yyf2333 22b5ec17fb Using iterator pattern instead of List::Element *.
Co-authored-by: Adam Scott <ascott.ca@gmail.com>
2025-03-28 13:29:15 +08:00
Lukas Tenbrink ffa6ef220b Use `append_` instead of `parse_` for `String` methods. 2025-03-27 17:51:02 +01:00
Pāvels Nadtočajevs c3921954f2
Fix editor layout direction change on translation change. 2025-03-27 17:35:21 +02:00
kobewi bc9d0c7835 Add templated version of ObjectDB::get_instance() 2025-03-27 15:43:23 +01:00
Lukas Tenbrink dd9dc75a83 Optimize `Object::cast_to` by assuming no virtual and multiple inheritance, gaining 8x throughput over `dynamic_cast`.
Add `-Wvirtual-inheritance` to compiler warnings as a sanity check.
2025-03-27 15:39:53 +01:00
Mikael Hermansson 5c5b9847da Optimize `LocalVector::push_back` for non-trivial objects 2025-03-27 14:22:30 +01:00
BlueCube3310 649fa630a7 Image: Remove references to defunct `FORMAT_CUSTOM` 2025-03-26 21:37:26 +01:00
Alexander Montag b79a6ca3e7 Remove redundant ClassDB::locker declaration 2025-03-26 21:14:11 +01:00
kobewi 75881f8322 Use initializer list in Arrays 2025-03-26 18:38:15 +01:00
Lukas Tenbrink 28d6cf859a Add move semantics to `Ref`. 2025-03-26 15:23:38 +01:00
Ibrahn Sahir c9352f06f7 Fix uninitialised member vars in CommandQueueMT and RasterizerSceneGLES3 2025-03-25 17:19:16 +00:00
Pāvels Nadtočajevs d5cea9bb2e
Implement `DirAccess.is_equivalent` method. 2025-03-25 17:52:15 +02:00
Pedro J. Estébanez 2d885a3163
Sanitize ClassDB locking 2025-03-25 16:50:46 +01:00
Pāvels Nadtočajevs b384de9013
Load decompressable texture format is no supported one found. 2025-03-25 09:46:19 +02:00
Thaddeus Crews 8f16b86d7e
Core: Include `intrin.h` for MSVC 2025-03-24 15:19:49 -05:00
Thaddeus Crews 7fed5f29ed
Merge pull request #99826 from kiroxas/improveParseUTF8Performance
Improve `parse_utf8` performance
2025-03-24 10:00:55 -05:00
Thaddeus Crews 1cb3cfaa8e
Style: Convert namespaces to PascalCase 2025-03-23 19:10:24 -05:00
Thaddeus Crews 8f331ebd9c
Merge pull request #103099 from YeldhamDev/build_res_loader_disable
Disable `ResourceFormatLoader/Saver`s of disabled classes
2025-03-23 19:04:01 -05:00
Thaddeus Crews 325c698331
Merge pull request #103647 from aaronp64/dictionary_multiple_lookup
Avoid multiple lookups in `Dictionary::operator[]`
2025-03-23 19:04:00 -05:00
Thaddeus Crews 4c9086312d
Merge pull request #103698 from AThousandShips/fix_a_hash_map_construct
[Core] Fix `AHashMap` constructors reserving too few elements
2025-03-23 19:03:59 -05:00
Thaddeus Crews 2eec0fc526
Merge pull request #94441 from Repiteo/core/math-namespace
Core: Convert `Math` class to namespace
2025-03-23 19:03:55 -05:00
Thaddeus Crews fd45f42464
Merge pull request #101361 from Repiteo/core/isolate-ref-logic
Core: Isolate `Ref` forward declare logic
2025-03-23 19:03:54 -05:00
Thaddeus Crews d9ef361d12
Core: Isolate `Ref` forward declare logic 2025-03-23 08:22:00 -05:00
Thaddeus Crews f09ee0171a
Style: Begin integrating simple `.clangd` fixes 2025-03-22 13:24:35 -05:00
Hugo Locurcio 2044bd898a Add `double` to the version full build string when using a double-precision build
This means that `double` is now visible in the command line startup version,
project manager, editor About dialog and at the bottom of the editor.
This is because double-precision mode has a significant impact on how the
editor and projects run.

Similar to `mono` for C# builds, this affects which export templates the editor
looks for, since it needs a different set of export templates.

The export templates manager now indicates that no official double-precision export
template downloads are currently available (although the `dev` status message
takes priority over it).
2025-03-22 19:02:15 +01:00
Michael Alexsander 090358afcf
Disable `ResourceFormatLoader/Saver`s of disabled classes 2025-03-21 14:23:05 -03:00
Thaddeus Crews 581d675eeb
Core: Convert `Math` class to namespace 2025-03-21 10:29:18 -05:00
Rémi Verschelde 3f14e6a1b7
Merge pull request #104374 from aaronp64/array_swap_move
Optimize `Array` methods with `SWAP`/`std::move`
2025-03-21 13:04:04 +01:00
Rémi Verschelde 96a5d62507
Merge pull request #104355 from YYF233333/hashmap_iter
Optimize `ClassDB::get_direct_inheriters_from_class`
2025-03-21 13:03:53 +01:00
Rémi Verschelde 1f682b6554
Merge pull request #104237 from Ivorforce/optimize-thread-pool-waiting
Optimize thread pools by avoiding needless locks and unlocks of the `task_mutex`.
2025-03-21 13:03:37 +01:00
Rémi Verschelde 3ceb84f5b2
Merge pull request #104155 from bleikerja/utf8_to_base64_empty_string_fix
Fix `Marshalls.utf8_to_base64` shows `"ret.is_empty()" is true` error for empty string
2025-03-21 13:03:28 +01:00
kobewi 602806101c Improve error messages for add_property_info() 2025-03-20 22:39:09 +01:00
Pāvels Nadtočajevs abe413ff8c
Fix icons with non-ASCII file names in project manager. 2025-03-20 16:33:01 +02:00
Lukas Tenbrink 143f8e933e Optimize `Color::to_html` by allocating less. 2025-03-20 13:42:03 +01:00
Thaddeus Crews f6a35e2a6e
Merge pull request #86015 from kitbdev/array-initializer-list
Add list initialization to Array, Variant, and TypedArray
2025-03-19 17:46:06 -05:00
aaronp64 3eb4e6c6ff Optimize Array methods with SWAP/std::move
Updated Array::shuffle() to use SWAP instead of copying through temporary variables, which makes shuffling simple types around 2x faster, and refcounted object types around 20x faster.

Also updated multiple methods that insert into/modify the array to move their validated Variant to avoid an extra copy, speed increase varies depending on type and how much else the methods are doing, usually around 5-10% faster.
2025-03-19 12:17:14 -04:00
Yufeng Ying c37c92b450 Optimize ClassDB::get_direct_inheriters_from_class.
Co-authored-by: kleonc <9283098+kleonc@users.noreply.github.com>
2025-03-19 23:26:46 +08:00
kobewi 10f6c01b9c Remove ABS in favor of Math::abs 2025-03-19 13:52:40 +01:00
Rémi Verschelde 64bd03269f
Merge pull request #104286 from Ivorforce/localvector-find
Harmonize `String`, `Vector` and `LocalVector` `find` and `rfind`.
2025-03-19 12:27:27 +01:00
Rémi Verschelde 2fa721b1bc
Merge pull request #104127 from Ivorforce/360-noclip
Remove `String` clipping constructors.
2025-03-19 12:27:10 +01:00
Rémi Verschelde 65161977e9
Merge pull request #103415 from bruvzg/iv_pools
Use single RNG instance for `FileAccessEncrypted` IV generation.
2025-03-19 12:26:38 +01:00
Pablo Andres Fuente e2bef7041e Fix `StreamPeerGZIP::finish()` internal buffer size usage
Fixes #97201

Instead of using and arbitrary fixed size for the internal buffer,
the remaining available bytes of the internal `RingBuffer` is used.

Also add unit tests for `StreamPeerGZIP`.
2025-03-19 09:56:32 +01:00
Thaddeus Crews fdbf6ecc9f
Merge pull request #98408 from rune-scape/stringlikevariantorder-in-place
StringLikeVariantOrder: Compare in-place
2025-03-18 14:42:58 -05:00
Thaddeus Crews 5c90aad2d9
Merge pull request #101964 from YYF233333/opt_for_size
Don't inline certain functions for smaller binary size
2025-03-18 14:42:37 -05:00
Thaddeus Crews c8a94993bf
Merge pull request #103961 from bruvzg/win_pos_sync
Sync `display/window/size/initial_position_type` and `Window::WINDOW_INITIAL_POSITION_` enum.
2025-03-18 14:42:33 -05:00
rune-scape 0c7d78f455 StringLikeVariantOrder: Compare in-place 2025-03-18 11:21:30 -07:00
Yyf2333 b28d6d1fa3 Don't inline certain functions for smaller binary size.
Co-authored-by: Thaddeus Crews <repiteo@outlook.com>
2025-03-18 21:40:25 +08:00
Lukas Tenbrink fde71e0382 Harmonize `String`, `Vector` and `LocalVector` `find` and `rfind`.
Use `Span::find` for `LocalVector::find`, accepting negative `p_from`.
Return `-1` for invalid `p_from` values in `rfind`.
Accept negative values for `p_from` in `find`, starting from the back.
2025-03-18 12:37:36 +01:00
Thaddeus Crews 85258ec1a5
Merge pull request #102662 from groud/chunk_tilemap_physics
Chunk tilemap physics
2025-03-17 16:03:29 -05:00
Thaddeus Crews 1b631edf67
Merge pull request #104129 from dsnopek/gdextension-get-used-classes
GDExtension: Add mechanism to get which classes an extension is using
2025-03-17 16:03:27 -05:00
Thaddeus Crews f98cddfc71
Merge pull request #101994 from fire/vsk-save-dds-4.4
Add DDS image load and save functionality
2025-03-17 16:03:26 -05:00
Thaddeus Crews bb60b05ca4
Merge pull request #104182 from Ivorforce/small-little-string-function
Add missing `String + char *` function, to avoid unnecessary right side allocation to `String`.
2025-03-17 16:03:25 -05:00
Thaddeus Crews 06f0c6369e
Merge pull request #104273 from Ivorforce/fabs-absf
Simplify and optimize `Math::absf` implementation to use `::fabs` and `::fabsf`.
2025-03-17 16:03:24 -05:00
Thaddeus Crews 5750d4feca
Merge pull request #104183 from Repiteo/core/zero-constructible-expanded
Core: Expand `is_zero_constructible` coverage
2025-03-17 16:03:22 -05:00
David Snopek 2dff9fef37 GDExtension: Add mechanism to get which classes an extension is using 2025-03-17 15:27:14 -05:00
Thaddeus Crews ea62170dac
Core: Add `constexpr` constructors/operators to math structs
• Begin integrating `constexpr` on math tests; use `static_assert` where appropriate
2025-03-17 12:15:31 -05:00
Thaddeus Crews 4320800621
Core: Expand `is_zero_constructible` coverage 2025-03-17 11:45:26 -05:00
Lukas Tenbrink 8c14766597 Add missing `String + char *` function, to avoid unnecessary right side allocation to `String`. 2025-03-17 17:31:35 +01:00
Thaddeus Crews b1d13c5173
Merge pull request #103932 from Ivorforce/span-algorithms-header
Move `CowData` `find`, `rfind` and `count` to `Span`
2025-03-17 10:52:18 -05:00
Thaddeus Crews 82f284d9fe
Merge pull request #104187 from Ivorforce/file-access-compressed-memcpy
Optimize `FileAccessCompressed::get_buffer` by using `memcpy`.
2025-03-17 10:52:16 -05:00
Lukas Tenbrink 24c11dea16 Simplify and optimize `absf` implementation to use `std::fabs`. 2025-03-17 14:50:15 +01:00
Lukas Tenbrink a9745aac5c Optimize reverb by removing stray `volatile` from the `undenormalize` function signature. 2025-03-16 15:50:50 +01:00
Lukas Tenbrink 9d30732c5b Optimize thread pools by avoiding needless locks and unlocks of the `task_mutex`. 2025-03-16 15:33:55 +01:00
Lukas Tenbrink b67e213b16 Optimize `FileAccessCompressed::get_buffer` by using `memcpy`. 2025-03-16 12:22:06 +01:00