Skip to content

Commit fae71d3

Browse files
author
MarcoFalke
committed
clang-tidy: Apply modernize-deprecated-headers
This can be reproduced according to the developer notes with something like ( cd ./src/ && ../contrib/devtools/run-clang-tidy.py -p ../bld-cmake -fix -j $(nproc) ) Also, the header related changes were done manually.
1 parent 2d819fa commit fae71d3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+101
-98
lines changed

src/.clang-tidy

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ bugprone-lambda-function-name,
99
bugprone-unhandled-self-assignment,
1010
misc-unused-using-decls,
1111
misc-no-recursion,
12+
modernize-deprecated-headers,
1213
modernize-use-default-member-init,
1314
modernize-use-emplace,
1415
modernize-use-equals-default,
@@ -29,6 +30,8 @@ readability-redundant-string-init,
2930
HeaderFilterRegex: '.'
3031
WarningsAsErrors: '*'
3132
CheckOptions:
33+
- key: modernize-deprecated-headers.CheckHeaderFile
34+
value: false
3235
- key: performance-move-const-arg.CheckTriviallyCopyableMove
3336
value: false
3437
- key: bugprone-unhandled-self-assignment.WarnOnlyIfThisHasSuspiciousField

src/base58.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#include <util/strencodings.h>
1010
#include <util/string.h>
1111

12-
#include <assert.h>
13-
#include <string.h>
12+
#include <cassert>
13+
#include <cstring>
1414

1515
#include <limits>
1616

src/bech32.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#include <util/vector.h>
88

99
#include <array>
10-
#include <assert.h>
10+
#include <cassert>
1111
#include <numeric>
1212
#include <optional>
1313

src/bech32.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#ifndef BITCOIN_BECH32_H
1515
#define BITCOIN_BECH32_H
1616

17-
#include <stdint.h>
17+
#include <cstdint>
1818
#include <string>
1919
#include <vector>
2020

src/bench/examples.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#include <bench/bench.h>
66

77
// Extremely fast-running benchmark:
8-
#include <math.h>
8+
#include <cmath>
99

1010
volatile double sum = 0.0; // volatile, global so not optimized away
1111

src/bench/parse_hex.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
#include <bench/bench.h>
66
#include <random.h>
7-
#include <stddef.h>
7+
#include <cstddef>
88
#include <util/strencodings.h>
99
#include <cassert>
1010
#include <optional>

src/bip324.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
#include <uint256.h>
1717

1818
#include <algorithm>
19-
#include <assert.h>
19+
#include <cassert>
2020
#include <cstdint>
2121
#include <cstddef>
2222
#include <iterator>

src/chainparamsbase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#include <tinyformat.h>
1010
#include <util/chaintype.h>
1111

12-
#include <assert.h>
12+
#include <cassert>
1313

1414
void SetupChainParamsBaseOptions(ArgsManager& argsman)
1515
{

src/cluster_linearize.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include <algorithm>
99
#include <numeric>
1010
#include <optional>
11-
#include <stdint.h>
11+
#include <cstdint>
1212
#include <vector>
1313
#include <utility>
1414

src/coins.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
#include <util/check.h>
1717
#include <util/hasher.h>
1818

19-
#include <assert.h>
20-
#include <stdint.h>
19+
#include <cassert>
20+
#include <cstdint>
2121

2222
#include <functional>
2323
#include <unordered_map>

0 commit comments

Comments
 (0)