Implement read-only dictionaries.
* Add ability to set them read only. * If read-only, it can't be modified. This is added in order to optionally make const dictionaries (and eventually arrays) properly read-only in GDScript.
This commit is contained in:
parent
c41f62c3df
commit
e6c443a353
3 changed files with 71 additions and 5 deletions
|
|
@ -84,6 +84,9 @@ public:
|
|||
Dictionary duplicate(bool p_deep = false) const;
|
||||
Dictionary recursive_duplicate(bool p_deep, int recursion_count) const;
|
||||
|
||||
void set_read_only(bool p_enable);
|
||||
bool is_read_only() const;
|
||||
|
||||
const void *id() const;
|
||||
|
||||
Dictionary(const Dictionary &p_from);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue