refactor: Drop no longer used swap member functions

This commit is contained in:
Hennadii Stepanov committed 2023-03-21 13:04:53 +00:00
1 parent a87fb6bee5
commit cea50521fe
2 files changed
-29

No files matched your search

-18
View File
@@ -43,7 +43,6 @@ struct FakeCheck {
{ {
return true; return true;
} }
void swap(FakeCheck& x) noexcept {};
}; };
struct FakeCheckCheckCompletion { struct FakeCheckCheckCompletion {
@@ -53,7 +52,6 @@ struct FakeCheckCheckCompletion {
n_calls.fetch_add(1, std::memory_order_relaxed); n_calls.fetch_add(1, std::memory_order_relaxed);
return true; return true;
} }
void swap(FakeCheckCheckCompletion& x) noexcept {};
}; };
struct FailingCheck { struct FailingCheck {
@@ -64,10 +62,6 @@ struct FailingCheck {
{ {
return !fails; return !fails;
} }
void swap(FailingCheck& x) noexcept
{
std::swap(fails, x.fails);
};
}; };
struct UniqueCheck { struct UniqueCheck {
@@ -82,10 +76,6 @@ struct UniqueCheck {
results.insert(check_id); results.insert(check_id);
return true; return true;
} }
void swap(UniqueCheck& x) noexcept
{
std::swap(x.check_id, check_id);
};
}; };
@@ -113,10 +103,6 @@ struct MemoryCheck {
{ {
fake_allocated_memory.fetch_sub(b, std::memory_order_relaxed); fake_allocated_memory.fetch_sub(b, std::memory_order_relaxed);
}; };
void swap(MemoryCheck& x) noexcept
{
std::swap(b, x.b);
};
}; };
struct FrozenCleanupCheck { struct FrozenCleanupCheck {
@@ -151,10 +137,6 @@ struct FrozenCleanupCheck {
other.should_freeze = false; other.should_freeze = false;
return *this; return *this;
} }
void swap(FrozenCleanupCheck& x) noexcept
{
std::swap(should_freeze, x.should_freeze);
};
}; };
// Static Allocations // Static Allocations
-11
View File
@@ -328,17 +328,6 @@ public:
bool operator()(); bool operator()();
void swap(CScriptCheck& check) noexcept
{
std::swap(ptxTo, check.ptxTo);
std::swap(m_tx_out, check.m_tx_out);
std::swap(nIn, check.nIn);
std::swap(nFlags, check.nFlags);
std::swap(cacheStore, check.cacheStore);
std::swap(error, check.error);
std::swap(txdata, check.txdata);
}
ScriptError GetScriptError() const { return error; } ScriptError GetScriptError() const { return error; }
}; };