mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 11:32:46 +01:00
refactor: use swap instead assign+clean in GetAndClearDirtyGovernanceObjectHashes
This commit is contained in:
parent
83e0bb6e35
commit
6f75a7f601
@ -122,9 +122,8 @@ void CMasternodeMetaMan::RemoveGovernanceObject(const uint256& nGovernanceObject
|
||||
|
||||
std::vector<uint256> CMasternodeMetaMan::GetAndClearDirtyGovernanceObjectHashes()
|
||||
{
|
||||
LOCK(cs);
|
||||
std::vector<uint256> vecTmp = std::move(vecDirtyGovernanceObjectHashes);
|
||||
vecDirtyGovernanceObjectHashes.clear();
|
||||
std::vector<uint256> vecTmp;
|
||||
WITH_LOCK(cs, vecTmp.swap(vecDirtyGovernanceObjectHashes));
|
||||
return vecTmp;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user