Pair and connect with Moonlight-iOS

This commit is contained in:
loki
2020-04-17 18:42:55 +02:00
parent c7d6e959e0
commit 5a4055f313
3 changed files with 23 additions and 5 deletions
+9 -1
View File
@@ -451,7 +451,7 @@ public:
other._own_ptr = false;
}
wrap_ptr &operator=(wrap_ptr &&other) {
wrap_ptr &operator=(wrap_ptr &&other) noexcept {
if(_own_ptr) {
delete _p;
}
@@ -484,6 +484,14 @@ public:
return *this;
}
~wrap_ptr() {
if(_own_ptr) {
delete _p;
}
_own_ptr = false;
}
const reference operator*() const {
return *_p;
}