mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 14:38:29 +01:00
validation: make CScriptCheck and prevector swap member functions noexcept
Reason: A swap must not fail; when a class has a swap member function, it should be declared noexcept. https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#c84-a-swap-function-must-not-fail
This commit is contained in:
@@ -328,7 +328,8 @@ public:
|
||||
|
||||
bool operator()();
|
||||
|
||||
void swap(CScriptCheck &check) {
|
||||
void swap(CScriptCheck& check) noexcept
|
||||
{
|
||||
std::swap(ptxTo, check.ptxTo);
|
||||
std::swap(m_tx_out, check.m_tx_out);
|
||||
std::swap(nIn, check.nIn);
|
||||
|
||||
Reference in New Issue
Block a user