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.
2 parents 19afe67 + 28d6cf8 commit f704113Copy full SHA for f704113
core/object/ref_counted.h
@@ -127,6 +127,15 @@ class Ref {
127
ref(p_from);
128
}
129
130
+ void operator=(Ref &&p_from) {
131
+ if (reference == p_from.reference) {
132
+ return;
133
+ }
134
+ unref();
135
+ reference = p_from.reference;
136
+ p_from.reference = nullptr;
137
138
+
139
template <typename T_Other>
140
void operator=(const Ref<T_Other> &p_from) {
141
ref_pointer<false>(Object::cast_to<T>(p_from.ptr()));
@@ -159,6 +168,11 @@ class Ref {
159
168
this->operator=(p_from);
160
169
161
170
171
+ Ref(Ref &&p_from) {
172
173
174
175
162
176
163
177
Ref(const Ref<T_Other> &p_from) {
164
178
0 commit comments