提交 572401fd 编写于 作者: P Palana

Add missing copy/move operations for OBSSignal

上级 60cc91f9
......@@ -150,4 +150,35 @@ public:
param = param_;
signal_handler_connect(handler, signal, callback, param);
}
OBSSignal(const OBSSignal&) = delete;
OBSSignal(OBSSignal &&other)
: handler (other.handler),
signal (other.signal),
callback(other.callback),
param (other.param)
{
other.handler = nullptr;
other.signal = nullptr;
other.callback = nullptr;
other.param = nullptr;
}
OBSSignal &operator=(const OBSSignal &) = delete;
OBSSignal &operator=(OBSSignal &&other)
{
Disconnect();
handler = other.handler;
signal = other.signal;
callback = other.callback;
param = other.param;
other.handler = nullptr;
other.signal = nullptr;
other.callback = nullptr;
other.param = nullptr;
return *this;
}
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册