Skip to content

Commit 4c6b7d3

Browse files
committed
Merge bitcoin/bitcoin#27297: test: Remove unused Check* default constructors
fae3490 test: Remove unused Check* default constructors (MarcoFalke) Pull request description: They are no longer needed after the removal of `swap`, see bitcoin/bitcoin#26749 (comment) Also, flatten a redundant `if` check. ACKs for top commit: hebasto: ACK fae3490 Tree-SHA512: c0bc0c16b5df0f16fc25e18d2414a2a3c4769da1aa30d53f8d267bc2e97dd79a0296db94c1e49cd1ca89bd42275d8c462f7bf47f03f105dfe867ebea6563454b
2 parents fc7c21f + fae3490 commit 4c6b7d3

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

src/test/checkqueue_tests.cpp

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@ struct FakeCheckCheckCompletion {
5757
struct FailingCheck {
5858
bool fails;
5959
FailingCheck(bool _fails) : fails(_fails){};
60-
FailingCheck() : fails(true){};
6160
bool operator()() const
6261
{
6362
return !fails;
@@ -69,7 +68,6 @@ struct UniqueCheck {
6968
static std::unordered_multiset<size_t> results GUARDED_BY(m);
7069
size_t check_id;
7170
UniqueCheck(size_t check_id_in) : check_id(check_id_in){};
72-
UniqueCheck() : check_id(0){};
7371
bool operator()()
7472
{
7573
LOCK(m);
@@ -86,7 +84,6 @@ struct MemoryCheck {
8684
{
8785
return true;
8886
}
89-
MemoryCheck() = default;
9087
MemoryCheck(const MemoryCheck& x)
9188
{
9289
// We have to do this to make sure that destructor calls are paired
@@ -176,9 +173,7 @@ static void Correct_Queue_range(std::vector<size_t> range)
176173
control.Add(std::move(vChecks));
177174
}
178175
BOOST_REQUIRE(control.Wait());
179-
if (FakeCheckCheckCompletion::n_calls != i) {
180-
BOOST_REQUIRE_EQUAL(FakeCheckCheckCompletion::n_calls, i);
181-
}
176+
BOOST_REQUIRE_EQUAL(FakeCheckCheckCompletion::n_calls, i);
182177
}
183178
small_queue->StopWorkerThreads();
184179
}

0 commit comments

Comments
 (0)