mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +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()
|
std::vector<uint256> CMasternodeMetaMan::GetAndClearDirtyGovernanceObjectHashes()
|
||||||
{
|
{
|
||||||
LOCK(cs);
|
std::vector<uint256> vecTmp;
|
||||||
std::vector<uint256> vecTmp = std::move(vecDirtyGovernanceObjectHashes);
|
WITH_LOCK(cs, vecTmp.swap(vecDirtyGovernanceObjectHashes));
|
||||||
vecDirtyGovernanceObjectHashes.clear();
|
|
||||||
return vecTmp;
|
return vecTmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user