Skip to content

Commit 6c01323

Browse files
author
MarcoFalke
committed
Merge bitcoin/bitcoin#26708: clang-tidy: Fix modernize-use-nullptr in headers
adb7dba clang-tidy: Fix `modernize-use-nullptr` in headers (Hennadii Stepanov) Pull request description: Split from bitcoin/bitcoin#26705 as was requested in bitcoin/bitcoin#26705 (comment). To test this PR, consider applying a diff as follows: ```diff --- a/src/.clang-tidy +++ b/src/.clang-tidy @@ -12,17 +12,9 @@ readability-redundant-declaration, readability-redundant-string-init, ' WarningsAsErrors: ' -bugprone-argument-comment, -bugprone-use-after-move, -misc-unused-using-decls, -modernize-use-default-member-init, modernize-use-nullptr, -performance-for-range-copy, -performance-move-const-arg, -performance-unnecessary-copy-initialization, -readability-redundant-declaration, -readability-redundant-string-init, ' CheckOptions: - key: performance-move-const-arg.CheckTriviallyCopyableMove value: false +HeaderFilterRegex: '.' ``` ACKs for top commit: john-moffett: ACK adb7dba Tree-SHA512: 67241fb212d837157a0a26f0d59e7f30a9d270d5b0ebfeb6ad9631e460fc7fba8c9a9dcd4c0520789353f68025a9f090f40f17176472a93cce1411e6d56f930b
2 parents caa2240 + adb7dba commit 6c01323

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/tinyformat.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -508,9 +508,9 @@ class FormatArg
508508
{
509509
public:
510510
FormatArg()
511-
: m_value(NULL),
512-
m_formatImpl(NULL),
513-
m_toIntImpl(NULL)
511+
: m_value(nullptr),
512+
m_formatImpl(nullptr),
513+
m_toIntImpl(nullptr)
514514
{ }
515515

516516
template<typename T>
@@ -1005,7 +1005,8 @@ class FormatListN : public FormatList
10051005
// Special 0-arg version - MSVC says zero-sized C array in struct is nonstandard
10061006
template<> class FormatListN<0> : public FormatList
10071007
{
1008-
public: FormatListN() : FormatList(0, 0) {}
1008+
public:
1009+
FormatListN() : FormatList(nullptr, 0) {}
10091010
};
10101011

10111012
} // namespace detail

0 commit comments

Comments
 (0)