You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
GDScript: Fix test for read-only state of constants
This commit is contained in:
@@ -775,15 +775,9 @@ Variant Array::get_typed_script() const {
|
||||
return _p->typed.script;
|
||||
}
|
||||
|
||||
void Array::set_read_only(bool p_enable) {
|
||||
if (p_enable == bool(_p->read_only != nullptr)) {
|
||||
return;
|
||||
}
|
||||
if (p_enable) {
|
||||
void Array::make_read_only() {
|
||||
if (_p->read_only == nullptr) {
|
||||
_p->read_only = memnew(Variant);
|
||||
} else {
|
||||
memdelete(_p->read_only);
|
||||
_p->read_only = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user