Removed unnecessary lock

pull/5/head
SChernykh 2021-08-24 17:56:36 +02:00
parent 20b3886bfb
commit d4388bf9c0
1 changed files with 0 additions and 7 deletions

View File

@ -103,9 +103,6 @@ BlockTemplate& BlockTemplate::operator=(const BlockTemplate& b)
WriteLock lock(m_lock);
// b.m_lock should already be locked here, but try to lock it for reading anyway
const int lock_result = uv_rwlock_tryrdlock(&b.m_lock);
m_pool = b.m_pool;
m_templateId = b.m_templateId;
m_blockTemplateBlob = b.m_blockTemplateBlob;
@ -139,10 +136,6 @@ BlockTemplate& BlockTemplate::operator=(const BlockTemplate& b)
m_knapsack.clear();
#endif
if (lock_result == 0) {
uv_rwlock_rdunlock(&b.m_lock);
}
return *this;
}