mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-06 03:02:37 +02:00
Merge #20530: lint, refactor: Update cppcheck linter to c++17 and improve explicit usage
1e62350ca2refactor: Improve use of explicit keyword (Fabian Jahr)c502a6dbfblint: Use c++17 std in cppcheck linter (Fabian Jahr) Pull request description: I found the `extended-lint-cppcheck` linter still uses `std=c++11` when reviewing #20471. The only difference in the output after this change is one line is missing: ``` src/script/descriptor.cpp:159:5: warning: Struct 'PubkeyProvider' has a constructor with 1 argument that is not explicit. [noExplicitConstructor] ``` After some digging, I am still not sure why this one is ignored with c++17 when 40 other`noExplicitConstructor` warnings were still appearing. In the second commit, I fix these warnings, adding `explicit` where appropriate and adding fixes to ignore otherwise. ACKs for top commit: practicalswift: cr ACK1e62350ca2: patch looks correct! MarcoFalke: review ACK1e62350ca2Tree-SHA512: dff7b324429a57160e217cf38d9ddbb6e70c6cb3d3e3e0bd4013d88e07afc2292c3df94d0acf7122e9d486322821682ecf15c8f2724a78667764c05d47f89a12
This commit is contained in:
@@ -15,7 +15,7 @@ class Node;
|
||||
class AddressBookTests : public QObject
|
||||
{
|
||||
public:
|
||||
AddressBookTests(interfaces::Node& node) : m_node(node) {}
|
||||
explicit AddressBookTests(interfaces::Node& node) : m_node(node) {}
|
||||
interfaces::Node& m_node;
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
@@ -15,7 +15,7 @@ class Node;
|
||||
class RPCNestedTests : public QObject
|
||||
{
|
||||
public:
|
||||
RPCNestedTests(interfaces::Node& node) : m_node(node) {}
|
||||
explicit RPCNestedTests(interfaces::Node& node) : m_node(node) {}
|
||||
interfaces::Node& m_node;
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
@@ -15,7 +15,7 @@ class Node;
|
||||
class WalletTests : public QObject
|
||||
{
|
||||
public:
|
||||
WalletTests(interfaces::Node& node) : m_node(node) {}
|
||||
explicit WalletTests(interfaces::Node& node) : m_node(node) {}
|
||||
interfaces::Node& m_node;
|
||||
|
||||
Q_OBJECT
|
||||
|
||||
Reference in New Issue
Block a user