diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-31 11:04:21 +0100 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2023-01-31 11:04:21 +0100 |
commit | 99a44f846975a87f7dc2f121818c9570b0457b96 (patch) | |
tree | 0562814c260f3f73c4cddd18f2cb6a18262b1f20 /doc/classes | |
parent | 97de7f39e19ed3658073a6bb626bcafb33039a17 (diff) | |
parent | 5909f9f07547895de24fb6965d44c859b69a54a2 (diff) |
Merge pull request #69248 from vonagam/fixing-typed-arrays
GDScript: Fix typed arrays
Diffstat (limited to 'doc/classes')
-rw-r--r-- | doc/classes/Array.xml | 25 | ||||
-rw-r--r-- | doc/classes/Dictionary.xml | 2 |
2 files changed, 17 insertions, 10 deletions
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 9be5e60f4a..213a2254af 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -59,14 +59,14 @@ <param index="2" name="class_name" type="StringName" /> <param index="3" name="script" type="Variant" /> <description> - Creates a typed array from the [param base] array. The base array can't be already typed. + Creates a typed array from the [param base] array. </description> </constructor> <constructor name="Array"> <return type="Array" /> <param index="0" name="from" type="Array" /> <description> - Constructs an [Array] as a copy of the given [Array]. + Returns the same array as [param from]. If you need a copy of the array, use [method duplicate]. </description> </constructor> <constructor name="Array"> @@ -200,6 +200,13 @@ [/codeblock] </description> </method> + <method name="assign"> + <return type="void" /> + <param index="0" name="array" type="Array" /> + <description> + Assigns elements of another [param array] into the array. Resizes the array to match [param array]. Performs type conversions if the array is typed. + </description> + </method> <method name="back" qualifiers="const"> <return type="Variant" /> <description> @@ -395,6 +402,13 @@ Returns [code]true[/code] if the array is read-only. See [method make_read_only]. Arrays are automatically read-only if declared with [code]const[/code] keyword. </description> </method> + <method name="is_same_typed" qualifiers="const"> + <return type="bool" /> + <param index="0" name="array" type="Array" /> + <description> + Returns [code]true[/code] if the array is typed the same as [param array]. + </description> + </method> <method name="is_typed" qualifiers="const"> <return type="bool" /> <description> @@ -609,13 +623,6 @@ [/codeblocks] </description> </method> - <method name="typed_assign"> - <return type="bool" /> - <param index="0" name="array" type="Array" /> - <description> - Assigns a different [Array] to this array reference. It the array is typed, the new array's type must be compatible and its elements will be automatically converted. - </description> - </method> </methods> <operators> <operator name="operator !="> diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index 776a9f6fc1..1591aa59bf 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -153,7 +153,7 @@ <return type="Dictionary" /> <param index="0" name="from" type="Dictionary" /> <description> - Returns the same array as [param from]. If you need a copy of the array, use [method duplicate]. + Returns the same dictionary as [param from]. If you need a copy of the dictionary, use [method duplicate]. </description> </constructor> </constructors> |