Skip to content

Commit 67d2db1

Browse files
committed
Merge #2936: [Cleanup] Unify header guards
76b04cb lint: Add include guard linter (Fuzzbawls) f3a5eda Cleanup: Unify header guards (Fuzzbawls) Pull request description: For a while now, we've been using a mish-mash of various header guard styles, with no real consistency project wide. This PR remedies that by setting a strict header guard notation style. All first-party headers now follow the below guard style: ```cpp #ifndef PIVX_<PATH_TO>_<FILENAME>_H #define PIVX_<PATH_TO>_<FILENAME>_H ... #endif // PIVX_<PATH_TO>_<FILENAME>_H ``` Git subtrees and integrated 3rd party libraries are excluded. A linter is included so as to prevent future inclusion of include guards that do not adhere to the above standard style. With this in place, there is more opportunity to "declutter" our file structure quite a bit, **especially** with regards to the GUI files. ACKs for top commit: 76b04cb panleone: tACK 76b04cb Liquid369: tACK 76b04cb Duddino: ACK 76b04cb Tree-SHA512: 8a42e2d110137775148404d37012d622a75ee7b6a90ee3691984e6d3f7f4179bc783a9dc38c66e7fdc317c71e987c56e57d6652aaed4ad6cffe8905e66881ccf
2 parents 738908e + 76b04cb commit 67d2db1

File tree

329 files changed

+992
-953
lines changed

Some content is hidden

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

329 files changed

+992
-953
lines changed

src/activemasternode.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
// Distributed under the MIT/X11 software license, see the accompanying
44
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

6-
#ifndef ACTIVEMASTERNODE_H
7-
#define ACTIVEMASTERNODE_H
6+
#ifndef PIVX_ACTIVEMASTERNODE_H
7+
#define PIVX_ACTIVEMASTERNODE_H
88

99
#include "key.h"
1010
#include "evo/deterministicmns.h"
@@ -117,4 +117,4 @@ bool GetActiveMasternodeKeys(CTxIn& vin, Optional<CKey>& key, CBLSSecretKey& bls
117117
// Get active masternode BLS operator keys for DMN
118118
bool GetActiveDMNKeys(CBLSSecretKey& key, CTxIn& vin);
119119

120-
#endif
120+
#endif // PIVX_ACTIVEMASTERNODE_H

src/addrdb.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
// Distributed under the MIT software license, see the accompanying
55
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
66

7-
#ifndef BITCOIN_ADDRDB_H
8-
#define BITCOIN_ADDRDB_H
7+
#ifndef PIVX_ADDRDB_H
8+
#define PIVX_ADDRDB_H
99

1010
#include "fs.h"
1111
#include "serialize.h"
@@ -94,4 +94,4 @@ class CBanDB
9494
bool Read(banmap_t& banSet);
9595
};
9696

97-
#endif //BITCOIN_ADDRDB_H
97+
#endif // PIVX_ADDRDB_H

src/addressbook.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ namespace AddressBook {
5050

5151
}
5252

53-
#endif //PIVX_ADDRESSBOOK_H
53+
#endif // PIVX_ADDRESSBOOK_H

src/addrman.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44
// Distributed under the MIT software license, see the accompanying
55
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
66

7-
#ifndef BITCOIN_ADDRMAN_H
8-
#define BITCOIN_ADDRMAN_H
7+
#ifndef PIVX_ADDRMAN_H
8+
#define PIVX_ADDRMAN_H
99

1010
#if defined(HAVE_CONFIG_H)
1111
#include "config/pivx-config.h"
@@ -742,4 +742,4 @@ friend class CAddrManTest;
742742

743743
};
744744

745-
#endif // BITCOIN_ADDRMAN_H
745+
#endif // PIVX_ADDRMAN_H

src/amount.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ typedef int64_t CAmount;
1515
static const CAmount COIN = 100000000;
1616
static const CAmount CENT = 1000000;
1717

18-
#endif // PIVX_AMOUNT_H
18+
#endif // PIVX_AMOUNT_H

src/arith_uint256.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
// Distributed under the MIT software license, see the accompanying
44
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

6-
#ifndef BITCOIN_ARITH_UINT256_H
7-
#define BITCOIN_ARITH_UINT256_H
6+
#ifndef PIVX_ARITH_UINT256_H
7+
#define PIVX_ARITH_UINT256_H
88

99
#include <assert.h>
1010
#include <cstring>
@@ -385,4 +385,4 @@ arith_uint512 UintToArith512(const uint512 &);
385385
const arith_uint256 ARITH_UINT256_ZERO = arith_uint256();
386386
const arith_uint256 ARITH_UINT256_ONE = arith_uint256(1);
387387

388-
#endif // BITCOIN_UINT256_H
388+
#endif // PIVX_ARITH_UINT256_H

src/attributes.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
// Distributed under the MIT software license, see the accompanying
44
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

6-
#ifndef BITCOIN_ATTRIBUTES_H
7-
#define BITCOIN_ATTRIBUTES_H
6+
#ifndef PIVX_ATTRIBUTES_H
7+
#define PIVX_ATTRIBUTES_H
88

99
#if defined(__has_cpp_attribute)
1010
# if __has_cpp_attribute(nodiscard)
@@ -29,4 +29,4 @@
2929
# define LIFETIMEBOUND
3030
#endif
3131

32-
#endif // BITCOIN_ATTRIBUTES_H
32+
#endif // PIVX_ATTRIBUTES_H

src/base58.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
* - E-mail usually won't line-break if there's no punctuation to break at.
1313
* - Double-clicking selects the whole number as one word if it's all alphanumeric.
1414
*/
15-
#ifndef BITCOIN_BASE58_H
16-
#define BITCOIN_BASE58_H
15+
#ifndef PIVX_BASE58_H
16+
#define PIVX_BASE58_H
1717

1818
#include "attributes.h"
1919
#include "chainparams.h"
@@ -65,4 +65,4 @@ NODISCARD bool DecodeBase58Check(const char* psz, std::vector<unsigned char>& vc
6565
*/
6666
NODISCARD bool DecodeBase58Check(const std::string& str, std::vector<unsigned char>& vchRet, int max_ret_len);
6767

68-
#endif // BITCOIN_BASE58_H
68+
#endif // PIVX_BASE58_H

src/bech32.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
// 6 characters of which are a checksum.
99
//
1010
// For more information, see BIP 173.
11-
#ifndef BITCOIN_BECH32_H
12-
#define BITCOIN_BECH32_H
11+
12+
#ifndef PIVX_BECH32_H
13+
#define PIVX_BECH32_H
1314

1415
#include <stdint.h>
1516
#include <string>
@@ -26,4 +27,4 @@ std::pair<std::string, std::vector<uint8_t>> Decode(const std::string& str);
2627

2728
} // namespace bech32
2829

29-
#endif // BITCOIN_BECH32_H
30+
#endif // PIVX_BECH32_H

src/bench/bench.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
#ifndef BITCOIN_BENCH_BENCH_H
6-
#define BITCOIN_BENCH_BENCH_H
5+
#ifndef PIVX_BENCH_BENCH_H
6+
#define PIVX_BENCH_BENCH_H
77

88
#include <chrono>
99
#include <functional>
@@ -138,4 +138,4 @@ class PlotlyPrinter : public Printer
138138
#define BENCHMARK(n, num_iters_for_one_second) \
139139
benchmark::BenchRunner BOOST_PP_CAT(bench_, BOOST_PP_CAT(__LINE__, n))(BOOST_PP_STRINGIZE(n), n, (num_iters_for_one_second));
140140

141-
#endif // BITCOIN_BENCH_BENCH_H
141+
#endif // PIVX_BENCH_BENCH_H

0 commit comments

Comments
 (0)