aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2022-12-17 11:55:11 +0100
committerMarcoFalke <*~=`'#}+{/-|&$^_@721217.xyz>2022-12-17 11:55:16 +0100
commit6c01323d9d18e8b919662004a475d490b6b746b6 (patch)
tree65545f618b59fe644bdd756449c3263be7bbdc1a
parentcaa22406809e6bce47564b5e92b78085086d6290 (diff)
parentadb7dba9de95c166103ac7eaf97d5bd83dc19605 (diff)
downloadbitcoin-6c01323d9d18e8b919662004a475d490b6b746b6.tar.xz
Merge bitcoin/bitcoin#26708: clang-tidy: Fix `modernize-use-nullptr` in headers
adb7dba9de95c166103ac7eaf97d5bd83dc19605 clang-tidy: Fix `modernize-use-nullptr` in headers (Hennadii Stepanov) Pull request description: Split from bitcoin/bitcoin#26705 as was requested in https://github.com/bitcoin/bitcoin/pull/26705#issuecomment-1353293405. 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 adb7dba9de95c166103ac7eaf97d5bd83dc19605 Tree-SHA512: 67241fb212d837157a0a26f0d59e7f30a9d270d5b0ebfeb6ad9631e460fc7fba8c9a9dcd4c0520789353f68025a9f090f40f17176472a93cce1411e6d56f930b
-rw-r--r--src/tinyformat.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/tinyformat.h b/src/tinyformat.h
index bedaa14007..8eded00add 100644
--- a/src/tinyformat.h
+++ b/src/tinyformat.h
@@ -508,9 +508,9 @@ class FormatArg
{
public:
FormatArg()
- : m_value(NULL),
- m_formatImpl(NULL),
- m_toIntImpl(NULL)
+ : m_value(nullptr),
+ m_formatImpl(nullptr),
+ m_toIntImpl(nullptr)
{ }
template<typename T>
@@ -1005,7 +1005,8 @@ class FormatListN : public FormatList
// Special 0-arg version - MSVC says zero-sized C array in struct is nonstandard
template<> class FormatListN<0> : public FormatList
{
- public: FormatListN() : FormatList(0, 0) {}
+public:
+ FormatListN() : FormatList(nullptr, 0) {}
};
} // namespace detail