Skip to content

Commit eeb577b

Browse files
committed
perf: swap arrays instead assigments to save allocation
1 parent 8254e06 commit eeb577b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/evo/cbtx.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ auto CachedGetQcHashesQcIndexedHashes(const CBlockIndex* pindexPrev, const llmq:
121121
}
122122
}
123123
}
124-
quorums_cached = quorums;
124+
std::swap(quorums_cached, quorums);
125125
return std::make_pair(qcHashes_cached, qcIndexedHashes_cached);
126126
}
127127

0 commit comments

Comments
 (0)