Skip to content
Snippets Groups Projects
Commit ccd2ce33 authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

fix DeviceModule move construct/assign

parent f27d8e8c
No related branches found
No related tags found
No related merge requests found
...@@ -82,12 +82,15 @@ namespace ChimeraTK { ...@@ -82,12 +82,15 @@ namespace ChimeraTK {
virtual ~DeviceModule(); virtual ~DeviceModule();
/** Move operation with the move constructor */ /** Move operation with the move constructor */
DeviceModule(DeviceModule&& other) { operator=(std::move(other)); } DeviceModule(DeviceModule&& other) {
operator=(std::move(other));
}
/** Move assignment */ /** Move assignment */
DeviceModule& operator=(DeviceModule&& other) { DeviceModule& operator=(DeviceModule&& other) {
assert(!moduleThread.joinable()); assert(!moduleThread.joinable());
assert(other.isHoldingInitialValueLatch); assert(other.isHoldingInitialValueLatch);
if(owner) owner->unregisterDeviceModule(this);
Module::operator=(std::move(other)); Module::operator=(std::move(other));
device = std::move(other.device); device = std::move(other.device);
deviceAliasOrURI = std::move(other.deviceAliasOrURI); deviceAliasOrURI = std::move(other.deviceAliasOrURI);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment