We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a3d234 commit ab2318dCopy full SHA for ab2318d
2 files changed
src/classes/luaTuple.cpp
@@ -15,8 +15,9 @@ void LuaTuple::_bind_methods() {
15
ClassDB::bind_method(D_METHOD("to_array"), &LuaTuple::toArray);
16
}
17
18
-LuaTuple *LuaTuple::fromArray(Array elms) {
19
- LuaTuple *tuple = memnew(LuaTuple);
+Ref<LuaTuple> LuaTuple::fromArray(Array elms) {
+ Ref<LuaTuple> tuple;
20
+ tuple.instantiate();
21
tuple->elements = elms;
22
return tuple;
23
src/classes/luaTuple.h
@@ -20,7 +20,7 @@ class LuaTuple : public RefCounted {
static void _bind_methods();
public:
- static LuaTuple *fromArray(Array elms);
+ static Ref<LuaTuple> fromArray(Array elms);
24
25
void pushBack(Variant var);
26
void pushFront(Variant var);
0 commit comments