summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Roden-Corrent <ryan@rcorre.net>2022-04-05 07:07:56 -0400
committerRyan Roden-Corrent <ryan@rcorre.net>2022-04-05 07:07:56 -0400
commitf84e2db35e2f6eceb4f8c3a1e8e9de7adf6f4c30 (patch)
treeadec69622b3dbd6c29339120a1d37f778a47abc3
parent60f8df380df7ddc5dde4de4384b488e8a342ce79 (diff)
Clarify Array.erase for nonexistant element.
The docs specify that Array.remove does nothing if the index does not exist. Array.erase does not have a similar phrase, so it's unclear if erase will print an error, or silently do nothing.
-rw-r--r--doc/classes/Array.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml
index 68cb615209..b5196a19d7 100644
--- a/doc/classes/Array.xml
+++ b/doc/classes/Array.xml
@@ -194,7 +194,7 @@
<return type="void" />
<argument index="0" name="value" type="Variant" />
<description>
- Removes the first occurrence of a value from the array. To remove an element by index, use [method remove_at] instead.
+ Removes the first occurrence of a value from the array. If the value does not exist in the array, nothing happens. To remove an element by index, use [method remove_at] instead.
[b]Note:[/b] This method acts in-place and doesn't return a value.
[b]Note:[/b] On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed.
</description>