diff options
author | Ignacio Roldán Etcheverry <neikeq@users.noreply.github.com> | 2022-12-23 21:15:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-23 21:15:24 +0100 |
commit | 5784bf1be0cdf409a115556bf6c54f78f3d454ef (patch) | |
tree | c19b6c26f0040d2f19a7faaa633ae4c4deb4f2aa /modules/mono/editor | |
parent | a545c29ace05e4863effe65da9b2a15a7b8f61a4 (diff) | |
parent | 24e4ac9167e6c949a6033231848d4d778c869a3d (diff) |
Merge pull request #70486 from raulsntos/dotnet/convert-to
C#: Rename `ConvertToX` methods
Diffstat (limited to 'modules/mono/editor')
-rw-r--r-- | modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs | 4 | ||||
-rw-r--r-- | modules/mono/editor/bindings_generator.cpp | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs index 8b2f96036b..f0a6a72281 100644 --- a/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs +++ b/modules/mono/editor/Godot.NET.Sdk/Godot.SourceGenerators/MarshalUtils.cs @@ -311,12 +311,12 @@ namespace Godot.SourceGenerators inputExpr, ")"), // We need a special case for generic Godot collections and GodotObjectOrDerived[], because VariantUtils.ConvertTo<T> is slower MarshalType.GodotGenericDictionary => - source.Append(VariantUtils, ".ConvertToDictionaryObject<", + source.Append(VariantUtils, ".ConvertToDictionary<", ((INamedTypeSymbol)typeSymbol).TypeArguments[0].FullQualifiedNameIncludeGlobal(), ", ", ((INamedTypeSymbol)typeSymbol).TypeArguments[1].FullQualifiedNameIncludeGlobal(), ">(", inputExpr, ")"), MarshalType.GodotGenericArray => - source.Append(VariantUtils, ".ConvertToArrayObject<", + source.Append(VariantUtils, ".ConvertToArray<", ((INamedTypeSymbol)typeSymbol).TypeArguments[0].FullQualifiedNameIncludeGlobal(), ">(", inputExpr, ")"), _ => source.Append(VariantUtils, ".ConvertTo<", diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp index 6559cbf75d..6cfdb15627 100644 --- a/modules/mono/editor/bindings_generator.cpp +++ b/modules/mono/editor/bindings_generator.cpp @@ -3650,7 +3650,7 @@ void BindingsGenerator::_populate_builtin_type_interfaces() { itype = TypeInterface(); itype.name = "Signal"; itype.cname = itype.name; - itype.proxy_name = "SignalInfo"; + itype.proxy_name = "Signal"; itype.cs_type = itype.proxy_name; itype.cs_in_expr = "%0"; itype.c_in = "%5using %0 %1_in = " C_METHOD_MANAGED_TO_SIGNAL "(in %1);\n"; @@ -3732,7 +3732,7 @@ void BindingsGenerator::_populate_builtin_type_interfaces() { itype.cname = itype.name; itype.cs_out = "%5return new %2(%0(%1));"; // For generic Godot collections, Variant.From<T>/As<T> is slower, so we need this special case - itype.cs_variant_to_managed = "VariantUtils.ConvertToArrayObject(%0)"; + itype.cs_variant_to_managed = "VariantUtils.ConvertToArray(%0)"; itype.cs_managed_to_variant = "VariantUtils.CreateFromArray(%0)"; builtin_types.insert(itype.cname, itype); @@ -3759,7 +3759,7 @@ void BindingsGenerator::_populate_builtin_type_interfaces() { itype.cname = itype.name; itype.cs_out = "%5return new %2(%0(%1));"; // For generic Godot collections, Variant.From<T>/As<T> is slower, so we need this special case - itype.cs_variant_to_managed = "VariantUtils.ConvertToDictionaryObject(%0)"; + itype.cs_variant_to_managed = "VariantUtils.ConvertToDictionary(%0)"; itype.cs_managed_to_variant = "VariantUtils.CreateFromDictionary(%0)"; builtin_types.insert(itype.cname, itype); |