1
0
Fork 0
Commit Graph

515 Commits

Author SHA1 Message Date
Thaddeus Crews 49219de402
Merge pull request #108862 from timothyqiu/plural-rules
Move context and plural support to `Translation`
2025-10-15 16:31:07 -05:00
Clay John 8b06cdf277
Revert "Handle NaN and Infinity in JSON stringify function" 2025-10-10 18:22:24 -07:00
Thaddeus Crews 89ce203427
Merge pull request #106997 from Ivorforce/fixed-move-semantics
Fix `FixedVector` move and copy semantics.
2025-10-10 10:26:06 -05:00
Thaddeus Crews 21e5b41642
Merge pull request #108837 from aaronfranke/json-handle-nan-inf
Handle NaN and Infinity in JSON stringify function
2025-10-10 10:25:55 -05:00
Michael Alexsander fdaf00af0e
Fix compilation failure in resource test file 2025-10-07 10:45:00 -03:00
Thaddeus Crews d1d28c0bcf
Merge pull request #111223 from Ivorforce/remove-iterator-include
Replace `std::size` usage with `std_size` to avoid `<iterator>` include.
2025-10-06 09:06:49 -05:00
Lukas Tenbrink 1db0a60dc0 Replace `std::size` usage with `std_size` to avoid `<iterator>` include. 2025-10-05 00:26:11 +02:00
Thaddeus Crews 00f8f62be7
Merge pull request #106084 from Kaleb-Reid/fix-geometry-3d
Fix ghost collisions in segment_intersects_convex()
2025-10-03 12:01:02 -05:00
Thaddeus Crews 93fd5c7ad0
Merge pull request #110907 from beicause/extension-deconstruct-before-object
Free script and extension instance before object deconstructing
2025-09-30 18:35:10 -05:00
Thaddeus Crews 6b22951162
Merge pull request #107954 from stuartcarnie/unix_domain_socket_support
Add Core UNIX domain socket support
2025-09-30 18:35:08 -05:00
Thaddeus Crews e256771e86
Merge pull request #108836 from aaronfranke/json-grisu
Use num_scientific (Grisu2) when stringifying JSON with full precision
2025-09-30 11:19:12 -05:00
Thaddeus Crews fdf32d1b2a
Merge pull request #108577 from YYF233333/global_class_list
Simplify `ScriptServer::get_global_class_list`
2025-09-30 11:19:10 -05:00
Thaddeus Crews f6fc2f4a08
Core: Remove `skip_cr` argument from `String` 2025-09-28 10:07:24 -05:00
Luo Zhihao 727066fe1f Free script and extension instance before object deconstructing
Co-Authored-By: Lukas Tenbrink <lukas.tenbrink@gmail.com>
2025-09-26 18:15:08 +08:00
Haoyu Qiu 4e80190a46 Move context and plural support to Translation
- `TranslationPO` is now an empty class. It exists for compatibility.
- `OptimizedTranslation` stays the same, no context or plural support.
2025-09-26 10:51:57 +08:00
Haoyu Qiu e882e42e1b Add default plural rules
This makes the PO loader correctly handle the situation where the optional
`Plural-Forms` header field does not exist.

The `Translation` class and its subclasses always have access to valid plural
rules via `_get_plural_rules()`. Plural rules are prioritized:

1. `Translation.plural_rules_override`
2. `TranslationServer.get_plural_rules(locale)`
3. The English plural rules: `nplurals=2; plurals=(n != 1)`

Co-Authored-By: Pāvels Nadtočajevs <7645683+bruvzg@users.noreply.github.com>
2025-09-26 10:51:57 +08:00
Haoyu Qiu ebb96e2303 Move plural rules logic into a separate class
- Extracts plural rules logic in `TranslationPO` into a new `PluralRules` class.
- Changes caching the last used plural index in `TranslationPO` into an LRU cache in `PluralRules`.
- Adds tests for `PluralRules`.
2025-09-26 10:51:55 +08:00
Stuart Carnie 7227fdd805 Core: Add UNIX domain socket support
> [!NOTE]
>
> Later versions of Windows has support for `AF_UNIX`, so it could be
> added.
2025-09-26 05:46:19 +10:00
Aaron Franke a238af4d20
Use num_scientific (Grisu2) when stringifying JSON with full precision 2025-09-24 08:21:37 -07:00
BlueCube3310 666ed1b51c Image: Make `fill` method also fill the mipmaps 2025-09-23 14:55:04 +02:00
Thaddeus Crews 8265bb8b6a
Merge pull request #110097 from aaronp64/array_tests
Add more `Array` tests
2025-09-19 13:07:13 -05:00
Thaddeus Crews 1e84bc4d9c
Merge pull request #108260 from Silver1063/master
Fix modifier order in keycode string generation
2025-09-18 12:42:20 -05:00
Yufeng Ying a50fc5acd8 Change ClassDB::get_class_list and related stuff. 2025-09-16 15:00:33 +08:00
aaronp64 2b855d831d Add more Array tests
Added more tests for Array, focusing on methods exposed to gdscript that didn't have tests.
2025-08-30 13:12:16 -04:00
Aaron Franke e90cea9250
Handle NaN and Infinity in JSON stringify function 2025-08-24 10:09:43 -07:00
Kaleb Reid a2b9fc08e3 Fix ghost collisions in segment_intersects_convex() 2025-08-22 22:49:56 -07:00
Aaron Franke b626695f70
Fix internal JSON stringify not preserving p_full_precision 2025-07-21 08:36:29 -07:00
Silver1063 00f5b230be Fix modifier order in keycode string generation
Fix the order in which modifier keys are appended in as_text() and keycode_get_string() to ensure consistent and logical ordering (Ctrl, Alt, Shift, Meta). Refactored keycode_get_string() to use a vector for building the key string, improving readability and maintainability.
2025-07-06 14:23:50 -07:00
Haoyu Qiu 296aba7dc5 Fix CSV translation not updating after reimport 2025-06-17 17:22:49 +08:00
kit 477a37a594 Fix Resource Duplication test errors 2025-06-15 12:48:03 -04:00
Lukas Tenbrink 2d0ff9774d Add a smoke test to `Span` in debug builds to recover from non-empty `nullptr` `Span`. 2025-06-12 12:19:21 +02:00
Rémi Verschelde 61639d9574
Merge pull request #106996 from Ivorforce/no-oa-hashmap
Core: Remove `OAHashMap`, in favour of `AHashMap`
2025-06-05 13:12:34 +02:00
aaronp64 6b2674fe18 Reuse and optimize sorting logic for List, SelfList, and HashMap
Added SortList class, and updated List, SelfList, and HashMap sort methods to use it.  Sorting is done with merge sort, with an initial check to optimize for already sorted lists, and sorted lists that were appended to.
2025-06-04 10:18:22 -04:00
Aaron Franke f6f1df7d73
Add 64-bit versions of core power of 2 functions 2025-06-01 23:11:12 -07:00
Lukas Tenbrink c3476b8205 Fix `FixedVector` move semantics. 2025-05-31 18:22:16 +02:00
Lukas Tenbrink 963c20565b Remove `OAHashMap`, in favour of `AHashMap`.
The two types had (mostly) the same decisions, but `AHashMap` is a faster implementation, and is more consistent with `HashMap`.
2025-05-31 15:50:10 +02:00
Thaddeus Crews 0f67c3e992
Merge pull request #104522 from Ivorforce/localvector-force-trivial-resize
Core: Add `resize_initialized` and `resize_uninitialized` to `Vector` and `LocalVector`
2025-05-27 09:39:27 -05:00
Thaddeus Crews 63dff62948
Merge pull request #100673 from RandomShaper/res_duplicate
Overhaul resource duplication
2025-05-27 09:39:25 -05:00
kit f7c182371e Remove build_array and build_dictionary from tests 2025-05-26 13:02:01 -04:00
Lukas Tenbrink 4cb8a0c77e Add `resize_initialized` and `resize_uninitialized` to `Vector`. These functions serve as replacements for `resize`, to make sure the caller understands whether elements need to be initialized 'by hand' after the call. 2025-05-26 18:35:41 +02:00
Pedro J. Estébanez 6841b45552 Add tests for resource duplication 2025-05-26 17:05:04 +02:00
Aaron Franke 15de1d6c35
Use Grisu2 algorithm in String::num_scientific to fix serializing 2025-05-22 09:13:16 -07:00
Thaddeus Crews d237e31a89
Style: Remove redundant `DEBUG_METHODS_ENABLED`
• Replaced with functionally identical and far more ubiquitous `DEBUG_ENABLED`
2025-05-15 13:09:41 -05:00
Yufeng Ying 3bf400ffae Move bisect to Span and deduplicate code.
Co-authored-by: Lukas Tenbrink <lukas.tenbrink@gmail.com>
2025-05-14 18:19:09 +08:00
Thaddeus Crews 0ce3d75c20
Merge pull request #93783 from aaronp64/json_stringify_performance
Improve `JSON::stringify` performance
2025-05-07 12:48:28 -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
kit 6d56d2d05e Fix tests that fail when alone 2025-05-06 13:48:16 -04:00
Thaddeus Crews acf38b2292
Merge pull request #76560 from aaronfranke/node-set-string-name
Change Node `set_name` to use StringName, slightly improves performance
2025-05-02 09:25:25 -05:00
Daniel Kinsman a0cc41b5ed
Use libjpeg-turbo for improved jpg compatibility and speed
Co-authored-by: Rémi Verschelde <rverschelde@gmail.com>
2025-05-02 11:47:56 +02:00
Aaron Franke a404b668a1
Change Node set_name to use StringName 2025-05-01 15:15:19 -07:00