mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
[GDScript][GDNative] Add 'sort' and 'has' methods to pooled arrays
This is a backport from 4.0 to 3.x that adds 'sort' and 'has' methods to the following types: - PoolByteArray - PoolIntArray - PoolRealArray - PoolStringArray - PoolVector2Array - PoolVector3Array - PoolColorArray For all the types above, the methods 'sort' and 'has' have been exposed to the GDNative API (v. 1.3) Since the method 'has' was already implemented in GDScript before, in this commit it has been only exposed to GDNative API. The classes documentation is updated. The method 'sort' uses the exisging class "Sorter". Pooled arrays in 4.0 are rewritten, that's why this backport is not completely indentical to the original PR made for 4.0 (see #32144).
This commit is contained in:
committed by
Kirill Diduk
parent
c18e18563f
commit
7b8b91f505
@@ -137,6 +137,11 @@
|
||||
Returns the number of elements in the array.
|
||||
</description>
|
||||
</method>
|
||||
<method name="sort">
|
||||
<description>
|
||||
Sorts the elements of the array in ascending order.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
<constants>
|
||||
</constants>
|
||||
|
||||
Reference in New Issue
Block a user