summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2017-09-12 15:02:22 +0200
committerGitHub <noreply@github.com>2017-09-12 15:02:22 +0200
commitaebf4fb48cc9cb1a589dad998a773d058c3b3e1f (patch)
tree1b419331959fda721d9fe81c5442c8c4118e0261 /doc
parent017e6e8a4c310dfd5cb6be2e72009ff2f24fcbcd (diff)
parentdaa66cd5c2cb699f037032165367c236dfe42e95 (diff)
Merge pull request #11106 from hpvb/documentation-fix-poolarrays
Correct the Pool*Array documentation
Diffstat (limited to 'doc')
-rw-r--r--doc/base/classes.xml40
1 files changed, 21 insertions, 19 deletions
diff --git a/doc/base/classes.xml b/doc/base/classes.xml
index 8ac8dcd88b..323ec8106d 100644
--- a/doc/base/classes.xml
+++ b/doc/base/classes.xml
@@ -39001,13 +39001,14 @@
<argument index="0" name="byte" type="int">
</argument>
<description>
+ Append an element at the end of the array (alias of [method push_back]).
</description>
</method>
<method name="append_array">
<argument index="0" name="array" type="PoolByteArray">
</argument>
<description>
- Append an [PoolByteArray] at the end of this array.
+ Append a [PoolByteArray] at the end of this array.
</description>
</method>
<method name="compress">
@@ -39016,7 +39017,7 @@
<argument index="0" name="compression_mode" type="int" default="0">
</argument>
<description>
- Returns a new [PoolByteArray] with the data compressed. The compression mode can be set using one of the COMPRESS_* constants of [File].
+ Returns a new [PoolByteArray] with the data compressed. Set the compression mode using one of [File]'s COMPRESS_* constants.
</description>
</method>
<method name="decompress">
@@ -39027,21 +39028,21 @@
<argument index="1" name="compression_mode" type="int" default="0">
</argument>
<description>
- Returns a new [PoolByteArray] with the data decompressed. The buffer_size should be set as the size of the uncompressed data. The compression mode can be set using one of the COMPRESS_* constants of [File].
+ Returns a new [PoolByteArray] with the data decompressed. Set buffer_size to the size of the uncompressed data. Set the compression mode using one of [File]'s COMPRESS_* constants.
</description>
</method>
<method name="get_string_from_ascii">
<return type="String">
</return>
<description>
- Returns a copy of the array's contents formatted as String. Fast alternative to get_string_from_utf8(), assuming the content is ASCII-only (unlike the UTF-8 function, this function maps every byte to a character in the string, so any multibyte sequence will be torn apart).
+ Returns a copy of the array's contents as [String]. Fast alternative to [method PoolByteArray.get_string_from_utf8] if the content is ASCII-only. Unlike the UTF-8 function this function maps every byte to a character in the array. Multibyte sequences will not be interpreted correctly. For parsing user input always use [method PoolByteArray.get_string_from_utf8].
</description>
</method>
<method name="get_string_from_utf8">
<return type="String">
</return>
<description>
- Returns a copy of the array's contents formatted as String, assuming the array is formatted as UTF-8. Slower than get_string_from_ascii(), but works for UTF-8. Usually you should prefer this function over get_string_from_ascii() to support international input.
+ Returns a copy of the array's contents as [String]. Slower than [method PoolByteArray.get_string_from_ascii] but supports UTF-8 encoded data. Use this function if you are unsure about the source of the data. For user input this function should always be preferred.
</description>
</method>
<method name="insert">
@@ -39078,7 +39079,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Set the size of the [PoolByteArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
+ Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size.
</description>
</method>
<method name="set">
@@ -39117,7 +39118,7 @@
Array of Colors
</brief_description>
<description>
- Array of Color, can only contains colors. Optimized for memory usage, can't fragment the memory.
+ Array of Color, Contains colors. Optimized for memory usage, can't fragment the memory.
</description>
<methods>
<method name="PoolColorArray">
@@ -39140,7 +39141,7 @@
<argument index="0" name="array" type="PoolColorArray">
</argument>
<description>
- Append an [PoolColorArray] at the end of this array.
+ Append a [PoolColorArray] at the end of this array.
</description>
</method>
<method name="insert">
@@ -39177,7 +39178,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Set the size of the [PoolColorArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
+ Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size.
</description>
</method>
<method name="set">
@@ -39193,7 +39194,7 @@
<return type="int">
</return>
<description>
- Return the array size.
+ Return the size of the array.
</description>
</method>
</methods>
@@ -39205,7 +39206,7 @@
Integer Array.
</brief_description>
<description>
- Integer Array. Array of integers. Can only contain integers. Optimized for memory usage, can't fragment the memory.
+ Integer Array. Contains integers. Optimized for memory usage, can't fragment the memory.
</description>
<methods>
<method name="PoolIntArray">
@@ -39265,7 +39266,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Set the size of the [PoolIntArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
+ Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size.
</description>
</method>
<method name="set">
@@ -39353,7 +39354,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Set the size of the [RealArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
+ Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size.
</description>
</method>
<method name="set">
@@ -39420,15 +39421,16 @@
</method>
<method name="invert">
<description>
+ Reverse the order of the elements in the array (so first element will now be the last).
</description>
</method>
<method name="join">
<return type="String">
</return>
- <argument index="0" name="string" type="String">
+ <argument index="0" name="delimiter" type="String">
</argument>
<description>
- Reverse the order of the elements in the array (so first element will now be the last).
+ Returns a [String] with each element of the array joined with the delimiter.
</description>
</method>
<method name="push_back">
@@ -39449,7 +39451,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Set the size of the [StringArray]. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
+ Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size.
</description>
</method>
<method name="set">
@@ -39537,7 +39539,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Set the size of the PoolVector2Array. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
+ Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size.
</description>
</method>
<method name="set">
@@ -39611,7 +39613,7 @@
<argument index="0" name="vector3" type="Vector3">
</argument>
<description>
- Insert a Vector3 at the end.
+ Insert a [Vector3] at the end.
</description>
</method>
<method name="remove">
@@ -39625,7 +39627,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Set the size of the PoolVector3Array. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array.
+ Set the size of the array. If the array is grown reserve elements at the end of the array. If the array is shrunk truncate the array to the new size.
</description>
</method>
<method name="set">