summaryrefslogtreecommitdiff
path: root/modules/mono/glue/Managed/Files/Array.cs
diff options
context:
space:
mode:
authorIgnacio Etcheverry <ignalfonsore@gmail.com>2019-02-28 18:33:42 +0100
committerIgnacio Etcheverry <ignalfonsore@gmail.com>2019-02-28 18:33:42 +0100
commit32cd8ba9bd9a2df09fccd23c64b5a2a9f5ef1836 (patch)
treef99368f1b0692a635a6acac042db99d655c0b706 /modules/mono/glue/Managed/Files/Array.cs
parentdf7541d2f95a81412e5c682ae9af1b42cac5f76b (diff)
C#: Add Array.Resize(int) method
Diffstat (limited to 'modules/mono/glue/Managed/Files/Array.cs')
-rw-r--r--modules/mono/glue/Managed/Files/Array.cs13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/mono/glue/Managed/Files/Array.cs b/modules/mono/glue/Managed/Files/Array.cs
index 9c804eba64..1ee64f3b71 100644
--- a/modules/mono/glue/Managed/Files/Array.cs
+++ b/modules/mono/glue/Managed/Files/Array.cs
@@ -155,6 +155,11 @@ namespace Godot.Collections
godot_icall_Array_RemoveAt(GetPtr(), index);
}
+ public Error Resize(int newSize)
+ {
+ return godot_icall_Array_Resize(GetPtr(), newSize);
+ }
+
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
@@ -203,6 +208,9 @@ namespace Godot.Collections
internal extern static void godot_icall_Array_RemoveAt(IntPtr ptr, int index);
[MethodImpl(MethodImplOptions.InternalCall)]
+ internal extern static Error godot_icall_Array_Resize(IntPtr ptr, int newSize);
+
+ [MethodImpl(MethodImplOptions.InternalCall)]
internal extern static void godot_icall_Array_Generic_GetElementTypeInfo(Type elemType, out int elemTypeEncoding, out IntPtr elemTypeClass);
}
@@ -339,6 +347,11 @@ namespace Godot.Collections
objectArray.RemoveAt(index);
}
+ public Error Resize(int newSize)
+ {
+ return objectArray.Resize(newSize);
+ }
+
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();