1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-04 12:00:25 +00:00

Implement read-only arrays

Arrays can be set as read-only and thus cannot be modified. Assigning
the array will create an editable copy.

Similar to is already done to read-only dictionaries.
This commit is contained in:
George Marques
2022-05-17 14:14:42 -03:00
parent 7ea8cde983
commit 023b1d7f5a
3 changed files with 72 additions and 1 deletions

View File

@@ -125,6 +125,10 @@ public:
uint32_t get_typed_builtin() const;
StringName get_typed_class_name() const;
Variant get_typed_script() const;
void set_read_only(bool p_enable);
bool is_read_only() const;
Array(const Array &p_from);
Array();
~Array();