George L. Albany
fad74366cd
Fix GCC 14 -Wtemplate-id-cdtor warning
...
As was fixed with godotengine/godot#91208
(cherry picked from commit 7b31f39bea
)
2024-09-04 10:16:26 -05:00
Aaron Franke
592a7762cd
[4.2] Fix missing MAKE_TYPED_ARRAY_INFO for Packed*Arrays
...
(cherry picked from commit a0d56336c3
)
2024-09-04 10:16:01 -05:00
Klaim (Joël Lamotte)
d529fc5b69
removes warnings generated by GDCLASS usage
...
This change removes the warnings (unused parameters) coming from code injected by the GDCLASS macro.
Contrary to warnings coming from the normal source code which can be suppressed with most compiles by specifying the include directories of this library as external or system,
when the code is injected through a macro it is considered in the context of the user, which is the source code of user of the library.
That forces the users to modify their code to hide the warnings coming from the mandatory `GDCLASS` here.
That's why it's important to remove these warning from that specific macro and ideally any other macro that the user must use.
(cherry picked from commit 738859f49b
)
2024-09-04 10:10:04 -05:00
Chris Cranford
9a4ba00b0e
Make sure `_get` and `_set` dispatch up the class hierarchy
...
(cherry picked from commit c77d44f3f6
)
2024-09-04 10:09:27 -05:00
A Thousand Ships
7dd2d24805
Fix sharing of typed arrays from constructor
...
(cherry picked from commit 41aa71f8c3
)
2024-07-17 09:58:09 -05:00
Yuri Sizov
18b81efbf3
Fix argument metadata when binding methods
...
While there doesn't seem to be any runtime issues,
this triggers the address sanitizer in a few ways,
depending on what kind of method you're
binding.
(cherry picked from commit 2b34bd0d8b
)
2024-07-17 09:57:10 -05:00
Thaddeus Crews
ca26922a19
Integrate `.pre-commit-config.yaml`
...
(cherry picked from commit e0d363aad8
)
2024-07-17 09:56:32 -05:00
Thaddeus Crews
edce0b7178
Fix `#include` formatting
...
(cherry picked from commit 999018e7d1
)
2024-07-17 09:53:29 -05:00
David Snopek
8269c0102a
Explicitly refer to `godot` namespace in `GDREGISTER_*_CLASS()` macros
...
(cherry picked from commit 246a803954
)
2024-06-14 10:31:04 -05:00
David Snopek
7b93607779
Fix NOTIFICATION_POSTINITIALIZE sent twice to native parent class
...
(cherry picked from commit 06373ce1cf
)
2024-05-17 17:11:27 -05:00
Daylily-Zeleen
1ab42ec6c5
mark return value of `get_class_static` and `get_parent_class_static` as const
...
(cherry picked from commit 3db8549e19
)
2024-05-17 16:58:32 -05:00
David Snopek
6328728dc2
Allow forwarding from `ClassDB` to `ClassDBSingleton` to support enumerations
...
(cherry picked from commit e1b3b32db5
)
2024-05-17 16:57:33 -05:00
David Snopek
6123c86f06
Correctly handle `Object *` arguments that were encoded as `nullptr`
...
(cherry picked from commit 37542dc2ec
)
2024-05-17 16:56:37 -05:00
David Snopek
fff665e0f5
Give compile-time error if registering a class without its own `_bind_methods()` function
...
(cherry picked from commit ca46ef4d25
)
2024-05-17 16:55:41 -05:00
pupil1337
82ea3f74a4
Add static_assert() for register_class
...
(cherry picked from commit 1fa7a9cb19
)
2024-05-17 16:54:44 -05:00
A Thousand Ships
11cd9a0727
[Math] Add `is_finite` methods
...
(cherry picked from commit d389171905
)
2024-05-17 16:54:00 -05:00
Chris Cranford
a75e33c333
Implement to/from dict helpers for PropertyInfo/MethodInfo
...
(cherry picked from commit 2a041b5240
)
2024-05-17 16:53:43 -05:00
David Snopek
d24983d682
Backport miscellaneous changes that can't be cherry-picked
...
(cherry picked from commit 9afbdb9cf6
)
2024-05-17 16:51:42 -05:00
Chris Cranford
30ebe5fdf9
Fix PropertyInfo to use hint/usage default constants
...
(cherry picked from commit e160966163
)
2024-04-17 11:01:33 -05:00
A Thousand Ships
c8fa4c0fd0
Fix incorrect utility call signature
...
(cherry picked from commit d055b575fb
)
2024-04-08 11:40:05 -05:00
Thaddeus Crews
9e48c45bfc
Enforce template syntax `typename` over `class`
...
(cherry picked from commit 87f5fb0691
)
2024-04-08 11:39:21 -05:00
David Snopek
76d6ce7136
Avoid creating most objects that Godot is going to use placement new to initialize
...
(cherry picked from commit c4fde852e6
)
2024-04-08 11:30:23 -05:00
A Thousand Ships
07e245e3e4
Fix invalid `void` return in `BitField`
...
(cherry picked from commit 7ed8ef7221
)
2024-03-11 13:33:57 -05:00
Marc Gilleron
ed576f8318
Fix explicit namespaces in macros
...
(cherry picked from commit e607790647
)
2024-03-11 13:33:44 -05:00
David Snopek
f7a9d32f32
Fix _notification with parent and child classes
...
(cherry picked from commit 23c010900c
)
2024-03-11 13:31:19 -05:00
bruvzg
08da55cd0b
[Core] Improve `CowData` and `Memory` metadata alignment.
...
(cherry picked from commit b173a4d935
)
2024-03-11 13:11:26 -05:00
DaylilyZeleen
1ac8627b2e
Fix object return value of builtin types' methods.
...
(cherry picked from commit 6a3753c076
)
2024-03-11 12:59:32 -05:00
bruvzg
6202bf141e
Switch to 64-bit ints.
...
(cherry picked from commit 59a5a8b104
)
2024-03-11 12:59:19 -05:00
David Snopek
4b63d795e4
Merge pull request #1373 from dsnopek/4.1-cherrypicks-7
...
Cherry-picks for the godot-cpp 4.1 branch - 7th batch
2024-02-16 09:37:17 -06:00
A Thousand Ships
1c03aa7746
Add missing `OP_POWER` operator to `Variant`
...
(cherry picked from commit f037a697eb
)
2024-01-22 15:53:49 -06:00
bruvzg
b622b11df3
[iOS] Fix initialisation/termination of multiple statically linked extensions.
...
(cherry picked from commit adc9def046
)
2024-01-22 15:53:49 -06:00
Thaddeus Crews
e8b6887b36
Add missing int→Variant conversions
...
(cherry picked from commit bcac96c8c2
)
2024-01-22 15:53:49 -06:00
Thaddeus Crews
805cdde0b7
GDCLASS synced by ending with "private:"
...
• Matches implementation used by modules and godot itself
• Apply same to GDEXTENSION_CLASS, setup with same diff-friendly spacers as GDCLASS
(cherry picked from commit 6eb5d450bd
)
2023-11-13 13:00:24 -06:00
David Snopek
9d813310bb
Add protections against registering classes that didn't use GDCLASS()
...
(cherry picked from commit a61cdc8860
)
2023-10-23 10:11:04 -05:00
David Snopek
f7ffc4fe4d
Automatically register only engine classes whose header has been included
...
(cherry picked from commit b507b3e591
)
2023-10-22 14:46:26 -05:00
Mikael Hermansson
03ea717742
Declare explicit specializations for `CharStringT`
...
(cherry picked from commit 6e05b978b8
)
2023-10-22 14:03:10 -05:00
Matthew Murphy
857d8e3a56
Fix variant call compiler error
...
Co-authored-by: David Snopek <dsnopek@gmail.com>
(cherry picked from commit ca3e25de04
)
2023-10-09 08:43:23 -05:00
A Thousand Ships
59ebcfd744
Fix allocation size overflow check in `CowData`
...
(cherry picked from commit 06ffc7e952
)
2023-10-09 08:42:31 -05:00
A Thousand Ships
205beacc5b
Replace `ERR_FAIL_COND` with `ERR_FAIL_NULL` where applicable
...
(cherry picked from commit 1e5767693e
)
2023-10-09 08:42:16 -05:00
David Snopek
bc82ae8b0b
Add static methods to `ClassDB` for the methods bound to the `ClassDB` singleton
...
(cherry picked from commit 6f913563d8
)
2023-09-19 21:30:03 -05:00
David Snopek
dcd7a69512
Ensure that PtrToArg specializations for native structs are used
...
(cherry picked from commit 3cd3f24150
)
2023-09-19 21:22:54 -05:00
A Thousand Ships
014132d4c0
Ensure `const` correctness for wrappers
...
(cherry picked from commit f651df5e7a
)
2023-09-19 21:21:20 -05:00
A Thousand Ships
170a691a7e
Add remaining component-wise `min/max` functions to `Vector*`
...
(cherry picked from commit 52eb77efd4
)
2023-09-01 17:07:18 -05:00
Adam Scott
c7afd0f89a
Fix forgotten not operator
...
(cherry picked from commit f5c8e5190f
)
2023-09-01 17:06:51 -05:00
Adam Scott
6789b29b72
Fix Clang deprecated builtins
...
It seems that Clang and GCC have different interpretations of certain
builtins. So this PR uses std <type_traits> functions just as cowdata.h
does in the godot project.
(cherry picked from commit 5c262844ad
)
2023-09-01 17:06:39 -05:00
David Snopek
011965d864
Attempt to fully implement CharString
...
(cherry picked from commit 4df112cd95
)
2023-08-10 09:06:09 -05:00
Kehom
20be441026
Unregister custom classes in reverse registration order
2023-06-19 11:04:11 -03:00
Andy Maloney
db2394dbe7
Identifiers containing double underscore are reserved according to the C++ standard
...
Rename __* to _gde_*
https://timsong-cpp.github.io/cppwp/n3337/global.names
https://en.cppreference.com/w/cpp/language/identifiers
Identifiers appearing as a token or preprocessing token (i.e., not in user-defined-string-literal like operator ""id) (since C++11) of one of the following forms are reserved:
- identifiers with a double underscore anywhere;
- identifiers that begin with an underscore followed by an uppercase letter;
- in the global namespace, identifiers that begin with an underscore.
2023-06-15 20:45:01 -04:00
David Snopek
ad726015e7
Revert the changes from PR #1044 and #1045 and standardize on `Object **` encoding in ptrcall
2023-06-07 08:30:33 -05:00
Rémi Verschelde
2078c00bab
Merge pull request #1114 from dsnopek/editor-plugins
...
Add support for adding/removing editor plugins
2023-05-26 11:04:35 +02:00