Skip to content

Commit 3bc1cd3

Browse files
committed
refactor: Drop no longer used swap member functions
1 parent 9d454e8 commit 3bc1cd3

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
@@ -42,7 +42,6 @@ struct FakeCheck {
4242
{
4343
return true;
4444
}
45-
void swap(FakeCheck& x) noexcept {};
4645
};
4746

4847
struct FakeCheckCheckCompletion {
@@ -52,7 +51,6 @@ struct FakeCheckCheckCompletion {
5251
n_calls.fetch_add(1, std::memory_order_relaxed);
5352
return true;
5453
}
55-
void swap(FakeCheckCheckCompletion& x) noexcept {};
5654
};
5755

5856
struct FailingCheck {
@@ -63,10 +61,6 @@ struct FailingCheck {
6361
{
6462
return !fails;
6563
}
66-
void swap(FailingCheck& x) noexcept
67-
{
68-
std::swap(fails, x.fails);
69-
};
7064
};
7165

7266
struct UniqueCheck {
@@ -81,10 +75,6 @@ struct UniqueCheck {
8175
results.insert(check_id);
8276
return true;
8377
}
84-
void swap(UniqueCheck& x) noexcept
85-
{
86-
std::swap(x.check_id, check_id);
87-
};
8878
};
8979

9080

@@ -112,10 +102,6 @@ struct MemoryCheck {
112102
{
113103
fake_allocated_memory.fetch_sub(b, std::memory_order_relaxed);
114104
};
115-
void swap(MemoryCheck& x) noexcept
116-
{
117-
std::swap(b, x.b);
118-
};
119105
};
120106

121107
struct FrozenCleanupCheck {
@@ -144,10 +130,6 @@ struct FrozenCleanupCheck {
144130
should_freeze = other.should_freeze;
145131
other.should_freeze = false;
146132
}
147-
void swap(FrozenCleanupCheck& x) noexcept
148-
{
149-
std::swap(should_freeze, x.should_freeze);
150-
};
151133
};
152134

153135
// Static Allocations

src/validation.h

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

290290
bool operator()();
291291

292-
void swap(CScriptCheck& check) noexcept
293-
{
294-
std::swap(ptxTo, check.ptxTo);
295-
std::swap(m_tx_out, check.m_tx_out);
296-
std::swap(nIn, check.nIn);
297-
std::swap(nFlags, check.nFlags);
298-
std::swap(cacheStore, check.cacheStore);
299-
std::swap(error, check.error);
300-
std::swap(txdata, check.txdata);
301-
}
302-
303292
ScriptError GetScriptError() const { return error; }
304293
};
305294

0 commit comments

Comments
 (0)