Skip to content

Commit faa3d4f

Browse files
author
MarcoFalke
committed
Remove duplicate NDEBUG check from compat/assumptions.h
The check is already done in util/check.h, which is more widely included.
1 parent 97f756b commit faa3d4f

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

src/compat/assumptions.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,6 @@
1111
#include <cstddef>
1212
#include <limits>
1313

14-
// Assumption: We assume that the macro NDEBUG is not defined.
15-
// Example(s): We use assert(...) extensively with the assumption of it never
16-
// being a noop at runtime.
17-
#if defined(NDEBUG)
18-
# error "Bitcoin cannot be compiled without assertions."
19-
#endif
20-
2114
// Assumption: We assume a C++17 (ISO/IEC 14882:2017) compiler (minimum requirement).
2215
// Example(s): We assume the presence of C++17 features everywhere :-)
2316
// ISO Standard C++17 [cpp.predefined]p1:

src/net_processing.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616
#include <hash.h>
1717
#include <headerssync.h>
1818
#include <index/blockfilterindex.h>
19+
#include <kernel/chain.h>
1920
#include <kernel/mempool_entry.h>
2021
#include <logging.h>
21-
#include <kernel/chain.h>
2222
#include <merkleblock.h>
2323
#include <netbase.h>
2424
#include <netmessagemaker.h>
@@ -39,7 +39,7 @@
3939
#include <txmempool.h>
4040
#include <txorphanage.h>
4141
#include <txrequest.h>
42-
#include <util/check.h> // For NDEBUG compile time check
42+
#include <util/check.h>
4343
#include <util/strencodings.h>
4444
#include <util/trace.h>
4545
#include <validation.h>

src/validation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
#include <txmempool.h>
4848
#include <uint256.h>
4949
#include <undo.h>
50-
#include <util/check.h> // For NDEBUG compile time check
50+
#include <util/check.h>
5151
#include <util/fs.h>
5252
#include <util/fs_helpers.h>
5353
#include <util/hasher.h>

0 commit comments

Comments
 (0)