summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/variant/variant_call.cpp9
-rw-r--r--doc/classes/PackedByteArray.xml6
-rw-r--r--doc/classes/PackedColorArray.xml6
-rw-r--r--doc/classes/PackedFloat32Array.xml6
-rw-r--r--doc/classes/PackedFloat64Array.xml6
-rw-r--r--doc/classes/PackedInt32Array.xml6
-rw-r--r--doc/classes/PackedInt64Array.xml6
-rw-r--r--doc/classes/PackedStringArray.xml6
-rw-r--r--doc/classes/PackedVector2Array.xml6
-rw-r--r--doc/classes/PackedVector3Array.xml6
10 files changed, 63 insertions, 0 deletions
diff --git a/core/variant/variant_call.cpp b/core/variant/variant_call.cpp
index f3f2eb16c4..eba12b68bb 100644
--- a/core/variant/variant_call.cpp
+++ b/core/variant/variant_call.cpp
@@ -2068,6 +2068,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedByteArray, insert, sarray("at_index", "value"), varray());
bind_method(PackedByteArray, fill, sarray("value"), varray());
bind_methodv(PackedByteArray, resize, &PackedByteArray::resize_zeroed, sarray("new_size"), varray());
+ bind_method(PackedByteArray, clear, sarray(), varray());
bind_method(PackedByteArray, has, sarray("value"), varray());
bind_method(PackedByteArray, reverse, sarray(), varray());
bind_method(PackedByteArray, slice, sarray("begin", "end"), varray(INT_MAX));
@@ -2132,6 +2133,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedInt32Array, insert, sarray("at_index", "value"), varray());
bind_method(PackedInt32Array, fill, sarray("value"), varray());
bind_methodv(PackedInt32Array, resize, &PackedInt32Array::resize_zeroed, sarray("new_size"), varray());
+ bind_method(PackedInt32Array, clear, sarray(), varray());
bind_method(PackedInt32Array, has, sarray("value"), varray());
bind_method(PackedInt32Array, reverse, sarray(), varray());
bind_method(PackedInt32Array, slice, sarray("begin", "end"), varray(INT_MAX));
@@ -2155,6 +2157,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedInt64Array, insert, sarray("at_index", "value"), varray());
bind_method(PackedInt64Array, fill, sarray("value"), varray());
bind_methodv(PackedInt64Array, resize, &PackedInt64Array::resize_zeroed, sarray("new_size"), varray());
+ bind_method(PackedInt64Array, clear, sarray(), varray());
bind_method(PackedInt64Array, has, sarray("value"), varray());
bind_method(PackedInt64Array, reverse, sarray(), varray());
bind_method(PackedInt64Array, slice, sarray("begin", "end"), varray(INT_MAX));
@@ -2178,6 +2181,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedFloat32Array, insert, sarray("at_index", "value"), varray());
bind_method(PackedFloat32Array, fill, sarray("value"), varray());
bind_methodv(PackedFloat32Array, resize, &PackedFloat32Array::resize_zeroed, sarray("new_size"), varray());
+ bind_method(PackedFloat32Array, clear, sarray(), varray());
bind_method(PackedFloat32Array, has, sarray("value"), varray());
bind_method(PackedFloat32Array, reverse, sarray(), varray());
bind_method(PackedFloat32Array, slice, sarray("begin", "end"), varray(INT_MAX));
@@ -2201,6 +2205,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedFloat64Array, insert, sarray("at_index", "value"), varray());
bind_method(PackedFloat64Array, fill, sarray("value"), varray());
bind_methodv(PackedFloat64Array, resize, &PackedFloat64Array::resize_zeroed, sarray("new_size"), varray());
+ bind_method(PackedFloat64Array, clear, sarray(), varray());
bind_method(PackedFloat64Array, has, sarray("value"), varray());
bind_method(PackedFloat64Array, reverse, sarray(), varray());
bind_method(PackedFloat64Array, slice, sarray("begin", "end"), varray(INT_MAX));
@@ -2224,6 +2229,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedStringArray, insert, sarray("at_index", "value"), varray());
bind_method(PackedStringArray, fill, sarray("value"), varray());
bind_method(PackedStringArray, resize, sarray("new_size"), varray());
+ bind_method(PackedStringArray, clear, sarray(), varray());
bind_method(PackedStringArray, has, sarray("value"), varray());
bind_method(PackedStringArray, reverse, sarray(), varray());
bind_method(PackedStringArray, slice, sarray("begin", "end"), varray(INT_MAX));
@@ -2247,6 +2253,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedVector2Array, insert, sarray("at_index", "value"), varray());
bind_method(PackedVector2Array, fill, sarray("value"), varray());
bind_method(PackedVector2Array, resize, sarray("new_size"), varray());
+ bind_method(PackedVector2Array, clear, sarray(), varray());
bind_method(PackedVector2Array, has, sarray("value"), varray());
bind_method(PackedVector2Array, reverse, sarray(), varray());
bind_method(PackedVector2Array, slice, sarray("begin", "end"), varray(INT_MAX));
@@ -2270,6 +2277,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedVector3Array, insert, sarray("at_index", "value"), varray());
bind_method(PackedVector3Array, fill, sarray("value"), varray());
bind_method(PackedVector3Array, resize, sarray("new_size"), varray());
+ bind_method(PackedVector3Array, clear, sarray(), varray());
bind_method(PackedVector3Array, has, sarray("value"), varray());
bind_method(PackedVector3Array, reverse, sarray(), varray());
bind_method(PackedVector3Array, slice, sarray("begin", "end"), varray(INT_MAX));
@@ -2293,6 +2301,7 @@ static void _register_variant_builtin_methods() {
bind_method(PackedColorArray, insert, sarray("at_index", "value"), varray());
bind_method(PackedColorArray, fill, sarray("value"), varray());
bind_method(PackedColorArray, resize, sarray("new_size"), varray());
+ bind_method(PackedColorArray, clear, sarray(), varray());
bind_method(PackedColorArray, has, sarray("value"), varray());
bind_method(PackedColorArray, reverse, sarray(), varray());
bind_method(PackedColorArray, slice, sarray("begin", "end"), varray(INT_MAX));
diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml
index f7210122e6..36372fbe54 100644
--- a/doc/classes/PackedByteArray.xml
+++ b/doc/classes/PackedByteArray.xml
@@ -54,6 +54,12 @@
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
</description>
</method>
+ <method name="clear">
+ <return type="void" />
+ <description>
+ Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code].
+ </description>
+ </method>
<method name="compress" qualifiers="const">
<return type="PackedByteArray" />
<param index="0" name="compression_mode" type="int" default="0" />
diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml
index dd9ada44fb..390adfa5a6 100644
--- a/doc/classes/PackedColorArray.xml
+++ b/doc/classes/PackedColorArray.xml
@@ -54,6 +54,12 @@
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
</description>
</method>
+ <method name="clear">
+ <return type="void" />
+ <description>
+ Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code].
+ </description>
+ </method>
<method name="count" qualifiers="const">
<return type="int" />
<param index="0" name="value" type="Color" />
diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml
index ee5497cb1b..f5d5b4566b 100644
--- a/doc/classes/PackedFloat32Array.xml
+++ b/doc/classes/PackedFloat32Array.xml
@@ -55,6 +55,12 @@
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
</description>
</method>
+ <method name="clear">
+ <return type="void" />
+ <description>
+ Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code].
+ </description>
+ </method>
<method name="count" qualifiers="const">
<return type="int" />
<param index="0" name="value" type="float" />
diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml
index 2cc8eff059..dfac2c80e8 100644
--- a/doc/classes/PackedFloat64Array.xml
+++ b/doc/classes/PackedFloat64Array.xml
@@ -55,6 +55,12 @@
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
</description>
</method>
+ <method name="clear">
+ <return type="void" />
+ <description>
+ Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code].
+ </description>
+ </method>
<method name="count" qualifiers="const">
<return type="int" />
<param index="0" name="value" type="float" />
diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml
index 70f3f1d180..b29b1b1bd0 100644
--- a/doc/classes/PackedInt32Array.xml
+++ b/doc/classes/PackedInt32Array.xml
@@ -55,6 +55,12 @@
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
</description>
</method>
+ <method name="clear">
+ <return type="void" />
+ <description>
+ Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code].
+ </description>
+ </method>
<method name="count" qualifiers="const">
<return type="int" />
<param index="0" name="value" type="int" />
diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml
index 5d590f02a4..2a33238677 100644
--- a/doc/classes/PackedInt64Array.xml
+++ b/doc/classes/PackedInt64Array.xml
@@ -55,6 +55,12 @@
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
</description>
</method>
+ <method name="clear">
+ <return type="void" />
+ <description>
+ Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code].
+ </description>
+ </method>
<method name="count" qualifiers="const">
<return type="int" />
<param index="0" name="value" type="int" />
diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml
index 0e6afec2d9..364142f0b6 100644
--- a/doc/classes/PackedStringArray.xml
+++ b/doc/classes/PackedStringArray.xml
@@ -61,6 +61,12 @@
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
</description>
</method>
+ <method name="clear">
+ <return type="void" />
+ <description>
+ Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code].
+ </description>
+ </method>
<method name="count" qualifiers="const">
<return type="int" />
<param index="0" name="value" type="String" />
diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml
index 97ed8cdc57..632680e739 100644
--- a/doc/classes/PackedVector2Array.xml
+++ b/doc/classes/PackedVector2Array.xml
@@ -55,6 +55,12 @@
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
</description>
</method>
+ <method name="clear">
+ <return type="void" />
+ <description>
+ Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code].
+ </description>
+ </method>
<method name="count" qualifiers="const">
<return type="int" />
<param index="0" name="value" type="Vector2" />
diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml
index 102d68a22c..014e7d5aa5 100644
--- a/doc/classes/PackedVector3Array.xml
+++ b/doc/classes/PackedVector3Array.xml
@@ -54,6 +54,12 @@
[b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior.
</description>
</method>
+ <method name="clear">
+ <return type="void" />
+ <description>
+ Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code].
+ </description>
+ </method>
<method name="count" qualifiers="const">
<return type="int" />
<param index="0" name="value" type="Vector3" />