Skip to content

Commit cea5052

Browse files
committed
refactor: Drop no longer used swap member functions
1 parent a87fb6b commit cea5052

File tree

2 files changed

+0
-29
lines changed

2 files changed

+0
-29
lines changed

src/test/checkqueue_tests.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ struct FakeCheck {
4343
{
4444
return true;
4545
}
46-
void swap(FakeCheck& x) noexcept {};
4746
};
4847

4948
struct FakeCheckCheckCompletion {
@@ -53,7 +52,6 @@ struct FakeCheckCheckCompletion {
5352
n_calls.fetch_add(1, std::memory_order_relaxed);
5453
return true;
5554
}
56-
void swap(FakeCheckCheckCompletion& x) noexcept {};
5755
};
5856

5957
struct FailingCheck {
@@ -64,10 +62,6 @@ struct FailingCheck {
6462
{
6563
return !fails;
6664
}
67-
void swap(FailingCheck& x) noexcept
68-
{
69-
std::swap(fails, x.fails);
70-
};
7165
};
7266

7367
struct UniqueCheck {
@@ -82,10 +76,6 @@ struct UniqueCheck {
8276
results.insert(check_id);
8377
return true;
8478
}
85-
void swap(UniqueCheck& x) noexcept
86-
{
87-
std::swap(x.check_id, check_id);
88-
};
8979
};
9080

9181

@@ -113,10 +103,6 @@ struct MemoryCheck {
113103
{
114104
fake_allocated_memory.fetch_sub(b, std::memory_order_relaxed);
115105
};
116-
void swap(MemoryCheck& x) noexcept
117-
{
118-
std::swap(b, x.b);
119-
};
120106
};
121107

122108
struct FrozenCleanupCheck {
@@ -151,10 +137,6 @@ struct FrozenCleanupCheck {
151137
other.should_freeze = false;
152138
return *this;
153139
}
154-
void swap(FrozenCleanupCheck& x) noexcept
155-
{
156-
std::swap(should_freeze, x.should_freeze);
157-
};
158140
};
159141

160142
// Static Allocations

src/validation.h

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -328,17 +328,6 @@ class CScriptCheck
328328

329329
bool operator()();
330330

331-
void swap(CScriptCheck& check) noexcept
332-
{
333-
std::swap(ptxTo, check.ptxTo);
334-
std::swap(m_tx_out, check.m_tx_out);
335-
std::swap(nIn, check.nIn);
336-
std::swap(nFlags, check.nFlags);
337-
std::swap(cacheStore, check.cacheStore);
338-
std::swap(error, check.error);
339-
std::swap(txdata, check.txdata);
340-
}
341-
342331
ScriptError GetScriptError() const { return error; }
343332
};
344333

0 commit comments

Comments
 (0)