浏览代码

Merge pull request #74610 from vnen/array-dict-readonly-doc

Remove outdated note about const in Dictionary and Array docs
Rémi Verschelde 2 年之前
父节点
当前提交
e7b05327df
共有 2 个文件被更改,包括 0 次插入2 次删除
  1. 0 1
      doc/classes/Array.xml
  2. 0 1
      doc/classes/Dictionary.xml

+ 0 - 1
doc/classes/Array.xml

@@ -41,7 +41,6 @@
 		[b]Note:[/b] Concatenating with the [code]+=[/code] operator will create a new array, which has a cost. If you want to append another array to an existing array, [method append_array] is more efficient.
 		[b]Note:[/b] Arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate].
 		[b]Note:[/b] Erasing elements while iterating over arrays is [b]not[/b] supported and will result in unpredictable behavior.
-		[b]Note:[/b] When declaring an array with [code]const[/code], the array itself can still be mutated by defining the values at individual indices or pushing/removing elements. Using [code]const[/code] will only prevent assigning the constant with another value after it was initialized.
 	</description>
 	<tutorials>
 	</tutorials>

+ 0 - 1
doc/classes/Dictionary.xml

@@ -135,7 +135,6 @@
 		[/csharp]
 		[/codeblocks]
 		[b]Note:[/b] Erasing elements while iterating over dictionaries is [b]not[/b] supported and will result in unpredictable behavior.
-		[b]Note:[/b] When declaring a dictionary with [code]const[/code], the dictionary becomes read-only. A read-only Dictionary's entries cannot be overridden at run-time. This does [i]not[/i] affect nested [Array] and [Dictionary] values.
 	</description>
 	<tutorials>
 		<link title="GDScript basics: Dictionary">$DOCS_URL/tutorials/scripting/gdscript/gdscript_basics.html#dictionary</link>