diff options
author | RedworkDE <10944644+RedworkDE@users.noreply.github.com> | 2023-02-03 00:23:40 +0100 |
---|---|---|
committer | RedworkDE <10944644+RedworkDE@users.noreply.github.com> | 2023-02-03 00:25:48 +0100 |
commit | 7403a3a11bd2ce24b7422160bc4636a611726b4a (patch) | |
tree | 99bc6e55f5609dd89daaaf508e4bdd81acc7006b /modules/mono/glue/runtime_interop.cpp | |
parent | a16b0fec4093b22ef5f14c1a4eb9363c890ab06d (diff) | |
download | redot-engine-7403a3a11bd2ce24b7422160bc4636a611726b4a.tar.gz |
C#: Implement `IEquatable<>` and equality operators in `NodePath`
- Implement `IEquatable<>` interface.
- Implement `==` and `!=` operators.
- Override `Equals` and `GetHashCode`.
Diffstat (limited to 'modules/mono/glue/runtime_interop.cpp')
-rw-r--r-- | modules/mono/glue/runtime_interop.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/modules/mono/glue/runtime_interop.cpp b/modules/mono/glue/runtime_interop.cpp index d17fe3e75f..a90b07620c 100644 --- a/modules/mono/glue/runtime_interop.cpp +++ b/modules/mono/glue/runtime_interop.cpp @@ -1141,6 +1141,14 @@ bool godotsharp_node_path_is_absolute(const NodePath *p_self) { return p_self->is_absolute(); } +bool godotsharp_node_path_equals(const NodePath *p_self, const NodePath *p_other) { + return *p_self == *p_other; +} + +int godotsharp_node_path_hash(const NodePath *p_self) { + return p_self->hash(); +} + void godotsharp_randomize() { Math::randomize(); } @@ -1477,6 +1485,8 @@ static const void *unmanaged_callbacks[]{ (void *)godotsharp_node_path_get_subname, (void *)godotsharp_node_path_get_subname_count, (void *)godotsharp_node_path_is_absolute, + (void *)godotsharp_node_path_equals, + (void *)godotsharp_node_path_hash, (void *)godotsharp_bytes_to_var, (void *)godotsharp_convert, (void *)godotsharp_hash, |