mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-12-13 22:24:05 +01:00
Merge bitcoin/bitcoin#28579: refactor: Remove redundant checks in compat/assumptions.h
fa1a384706Move compat.h include from system.h to system.cpp (MarcoFalke)88887531b7Move compat/assumptions.h include to one place that actually needs it (MarcoFalke)77774110f4Remove __cplusplus from compat/assumptions.h (MarcoFalke)faa3d4f1d8Remove duplicate NDEBUG check from compat/assumptions.h (MarcoFalke) Pull request description: Generally, compile-time checks should be close to the code that use them. Especially, since `compat/assumptions.h` is only included in one place, where iwyu suggests to remove it. Fix all issues: * The `NDEBUG` check is used in `util/check`, so it is redundant in `compat/assumptions.h`. * The `__cplusplus` check is redundant with `doc/dependencies.md` (see commit message). * Add missing `// IWYU pragma: keep` to avoid removing the include by accident. ACKs for top commit: achow101: ACKfa1a384706TheCharlatan: re-ACKfa1a384706theuni: ACKfa1a384706Tree-SHA512: f8b6db84be5d8844a2267345c0b1405fcbc39b8b5eeaa24db5b8412a74145fe44cf188b6b0c39cc2b062690ed37ca5b4662473484afe28dbec6469e79961389b
This commit is contained in:
@@ -7,7 +7,10 @@
|
||||
#define BITCOIN_SERIALIZE_H
|
||||
|
||||
#include <attributes.h>
|
||||
#include <compat/assumptions.h> // IWYU pragma: keep
|
||||
#include <compat/endian.h>
|
||||
#include <prevector.h>
|
||||
#include <span.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdint>
|
||||
@@ -18,13 +21,9 @@
|
||||
#include <memory>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <string.h>
|
||||
#include <utility>
|
||||
#include <vector>
|
||||
|
||||
#include <prevector.h>
|
||||
#include <span.h>
|
||||
|
||||
/**
|
||||
* The maximum size of a serialized object in bytes or number of elements
|
||||
* (for eg vectors) when the size is encoded as CompactSize.
|
||||
|
||||
Reference in New Issue
Block a user