mirror of https://github.com/rusefi/rusefi.git
Fix BigBufferHandle https://github.com/rusefi/rusefi/issues/5983
This commit is contained in:
parent
a1423085e2
commit
a0c61a0ebc
|
@ -38,13 +38,17 @@ BigBufferHandle::BigBufferHandle(BigBufferHandle&& other) {
|
||||||
}
|
}
|
||||||
|
|
||||||
BigBufferHandle& BigBufferHandle::operator= (BigBufferHandle&& other) {
|
BigBufferHandle& BigBufferHandle::operator= (BigBufferHandle&& other) {
|
||||||
// swap contents of the two objects
|
if (this != &other) {
|
||||||
m_bufferPtr = other.m_bufferPtr;
|
if (m_bufferPtr) {
|
||||||
other.m_bufferPtr = nullptr;
|
releaseBuffer(m_bufferPtr, m_user);
|
||||||
|
}
|
||||||
m_user = other.m_user;
|
// swap contents of the two objects
|
||||||
other.m_user = BigBufferUser::None;
|
m_bufferPtr = other.m_bufferPtr;
|
||||||
|
other.m_bufferPtr = nullptr;
|
||||||
|
|
||||||
|
m_user = other.m_user;
|
||||||
|
other.m_user = BigBufferUser::None;
|
||||||
|
}
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue