summaryrefslogtreecommitdiffstats
path: root/core/variant/array.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-09-12 09:25:05 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-09-12 09:25:05 +0200
commit23e51c3cb563862fe9946e1838043a1f943067a5 (patch)
tree371bc591bb3855617b4e6e8f2d857632cc69dcdd /core/variant/array.cpp
parent18cdfb81011969efcab0dd0725a2fc6b6fdc00fd (diff)
parent27d1fb63e11b092be812e9f1fbd8730598ae9999 (diff)
downloadredot-engine-23e51c3cb563862fe9946e1838043a1f943067a5.tar.gz
Merge pull request #92888 from Hilderin/fix-unable-to-use-resourceLoader-in-c#-after-threaded-load
Fix inability to use ResourceLoader in C# after threaded load in GDScript
Diffstat (limited to 'core/variant/array.cpp')
-rw-r--r--core/variant/array.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/core/variant/array.cpp b/core/variant/array.cpp
index 54cd1eda2f..869499e668 100644
--- a/core/variant/array.cpp
+++ b/core/variant/array.cpp
@@ -803,6 +803,10 @@ bool Array::is_same_typed(const Array &p_other) const {
return _p->typed == p_other._p->typed;
}
+bool Array::is_same_instance(const Array &p_other) const {
+ return _p == p_other._p;
+}
+
uint32_t Array::get_typed_builtin() const {
return _p->typed.type;
}
@@ -815,6 +819,12 @@ Variant Array::get_typed_script() const {
return _p->typed.script;
}
+Array Array::create_read_only() {
+ Array array;
+ array.make_read_only();
+ return array;
+}
+
void Array::make_read_only() {
if (_p->read_only == nullptr) {
_p->read_only = memnew(Variant);