Skip to content

Commit ffffb7a

Browse files
author
MarcoFalke
committed
doc: Convert remaining comments to clang-tidy format
1 parent ce33194 commit ffffb7a

File tree

8 files changed

+19
-19
lines changed

8 files changed

+19
-19
lines changed

src/node/chainstate.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ std::optional<ChainstateLoadingError> LoadChainstate(bool fReset,
8282

8383
for (CChainState* chainstate : chainman.GetAll()) {
8484
chainstate->InitCoinsDB(
85-
/* cache_size_bytes */ nCoinDBCache,
86-
/* in_memory */ coins_db_in_memory,
87-
/* should_wipe */ fReset || fReindexChainState);
85+
/*cache_size_bytes=*/nCoinDBCache,
86+
/*in_memory=*/coins_db_in_memory,
87+
/*should_wipe=*/fReset || fReindexChainState);
8888

8989
if (coins_error_cb) {
9090
chainstate->CoinsErrorCatcher().AddReadErrCallback(coins_error_cb);

src/qt/signverifymessagedialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ void SignVerifyMessageDialog::on_addressBookButton_SM_clicked()
9191
{
9292
if (model && model->getAddressTableModel())
9393
{
94-
model->refresh(/* pk_hash_only */ true);
94+
model->refresh(/*pk_hash_only=*/true);
9595
AddressBookPage dlg(platformStyle, AddressBookPage::ForSelection, AddressBookPage::ReceivingTab, this);
9696
dlg.setModel(model->getAddressTableModel());
9797
if (dlg.exec())

src/rest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,7 @@ static bool rest_tx(const std::any& context, HTTPRequest* req, const std::string
661661
const NodeContext* const node = GetNodeContext(context, req);
662662
if (!node) return false;
663663
uint256 hashBlock = uint256();
664-
const CTransactionRef tx = GetTransaction(/* block_index */ nullptr, node->mempool.get(), hash, Params().GetConsensus(), hashBlock);
664+
const CTransactionRef tx = GetTransaction(/*block_index=*/nullptr, node->mempool.get(), hash, Params().GetConsensus(), hashBlock);
665665
if (!tx) {
666666
return RESTERR(req, HTTP_NOT_FOUND, hashStr + " not found");
667667
}

src/rpc/util.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ struct Sections {
421421
if (arg.m_type_str.size() != 0 && push_name) {
422422
left += "\"" + arg.GetName() + "\": " + arg.m_type_str.at(0);
423423
} else {
424-
left += push_name ? arg.ToStringObj(/* oneline */ false) : arg.ToString(/* oneline */ false);
424+
left += push_name ? arg.ToStringObj(/*oneline=*/false) : arg.ToString(/*oneline=*/false);
425425
}
426426
left += ",";
427427
PushSection({left, arg.ToDescriptionString()});
@@ -627,7 +627,7 @@ std::string RPCHelpMan::ToString() const
627627
if (was_optional) ret += ") ";
628628
was_optional = false;
629629
}
630-
ret += arg.ToString(/* oneline */ true);
630+
ret += arg.ToString(/*oneline=*/true);
631631
}
632632
if (was_optional) ret += " )";
633633

src/script/miniscript.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1503,27 +1503,27 @@ inline NodeRef<Key> DecodeScript(I& in, I last, const Ctx& ctx)
15031503
}
15041504
case DecodeContext::AND_V: {
15051505
if (constructed.size() < 2) return {};
1506-
BuildBack(Fragment::AND_V, constructed, /* reverse */ true);
1506+
BuildBack(Fragment::AND_V, constructed, /*reverse=*/true);
15071507
break;
15081508
}
15091509
case DecodeContext::AND_B: {
15101510
if (constructed.size() < 2) return {};
1511-
BuildBack(Fragment::AND_B, constructed, /* reverse */ true);
1511+
BuildBack(Fragment::AND_B, constructed, /*reverse=*/true);
15121512
break;
15131513
}
15141514
case DecodeContext::OR_B: {
15151515
if (constructed.size() < 2) return {};
1516-
BuildBack(Fragment::OR_B, constructed, /* reverse */ true);
1516+
BuildBack(Fragment::OR_B, constructed, /*reverse=*/true);
15171517
break;
15181518
}
15191519
case DecodeContext::OR_C: {
15201520
if (constructed.size() < 2) return {};
1521-
BuildBack(Fragment::OR_C, constructed, /* reverse */ true);
1521+
BuildBack(Fragment::OR_C, constructed, /*reverse=*/true);
15221522
break;
15231523
}
15241524
case DecodeContext::OR_D: {
15251525
if (constructed.size() < 2) return {};
1526-
BuildBack(Fragment::OR_D, constructed, /* reverse */ true);
1526+
BuildBack(Fragment::OR_D, constructed, /*reverse=*/true);
15271527
break;
15281528
}
15291529
case DecodeContext::ANDOR: {
@@ -1607,7 +1607,7 @@ inline NodeRef<Key> DecodeScript(I& in, I last, const Ctx& ctx)
16071607
if (in >= last) return {};
16081608
if (in[0].first == OP_IF) {
16091609
++in;
1610-
BuildBack(Fragment::OR_I, constructed, /* reverse */ true);
1610+
BuildBack(Fragment::OR_I, constructed, /*reverse=*/true);
16111611
} else if (in[0].first == OP_NOTIF) {
16121612
++in;
16131613
to_parse.emplace_back(DecodeContext::ANDOR, -1, -1);

src/test/net_peer_eviction_tests.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -478,8 +478,8 @@ BOOST_AUTO_TEST_CASE(peer_protection_test)
478478
c.m_network = NET_IPV6;
479479
}
480480
},
481-
/* protected_peer_ids */ {0, 4},
482-
/* unprotected_peer_ids */ {1, 2, 3},
481+
/*protected_peer_ids=*/{0, 4},
482+
/*unprotected_peer_ids=*/{1, 2, 3},
483483
random_context));
484484

485485
// Combined test: expect having 1 CJDNS, 1 I2P, 1 localhost and 1 onion peer

src/validation.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4837,7 +4837,7 @@ bool ChainstateManager::ActivateSnapshot(
48374837

48384838
auto snapshot_chainstate = WITH_LOCK(::cs_main,
48394839
return std::make_unique<CChainState>(
4840-
/* mempool */ nullptr, m_blockman, *this, base_blockhash));
4840+
/*mempool=*/nullptr, m_blockman, *this, base_blockhash));
48414841

48424842
{
48434843
LOCK(::cs_main);

src/wallet/rpc/backup.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1260,15 +1260,15 @@ RPCHelpMan importmulti()
12601260
{
12611261
{"desc", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "Descriptor to import. If using descriptor, do not also provide address/scriptPubKey, scripts, or pubkeys"},
12621262
{"scriptPubKey", RPCArg::Type::STR, RPCArg::Optional::NO, "Type of scriptPubKey (string for script, json for address). Should not be provided if using a descriptor",
1263-
/* oneline_description */ "", {"\"<script>\" | { \"address\":\"<address>\" }", "string / json"}
1263+
/*oneline_description=*/"", {"\"<script>\" | { \"address\":\"<address>\" }", "string / json"}
12641264
},
12651265
{"timestamp", RPCArg::Type::NUM, RPCArg::Optional::NO, "Creation time of the key expressed in " + UNIX_EPOCH_TIME + ",\n"
12661266
" or the string \"now\" to substitute the current synced blockchain time. The timestamp of the oldest\n"
12671267
" key will determine how far back blockchain rescans need to begin for missing wallet transactions.\n"
12681268
" \"now\" can be specified to bypass scanning, for keys which are known to never have been used, and\n"
12691269
" 0 can be specified to scan the entire blockchain. Blocks up to 2 hours before the earliest key\n"
12701270
" creation time of all keys being imported by the importmulti call will be scanned.",
1271-
/* oneline_description */ "", {"timestamp | \"now\"", "integer / string"}
1271+
/*oneline_description=*/"", {"timestamp | \"now\"", "integer / string"}
12721272
},
12731273
{"redeemscript", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "Allowed only if the scriptPubKey is a P2SH or P2SH-P2WSH address/scriptPubKey"},
12741274
{"witnessscript", RPCArg::Type::STR, RPCArg::Optional::OMITTED, "Allowed only if the scriptPubKey is a P2SH-P2WSH or P2WSH address/scriptPubKey"},
@@ -1596,7 +1596,7 @@ RPCHelpMan importdescriptors()
15961596
" \"now\" can be specified to bypass scanning, for outputs which are known to never have been used, and\n"
15971597
" 0 can be specified to scan the entire blockchain. Blocks up to 2 hours before the earliest timestamp\n"
15981598
" of all descriptors being imported will be scanned.",
1599-
/* oneline_description */ "", {"timestamp | \"now\"", "integer / string"}
1599+
/*oneline_description=*/"", {"timestamp | \"now\"", "integer / string"}
16001600
},
16011601
{"internal", RPCArg::Type::BOOL, RPCArg::Default{false}, "Whether matching outputs should be treated as not incoming payments (e.g. change)"},
16021602
{"label", RPCArg::Type::STR, RPCArg::Default{""}, "Label to assign to the address, only allowed with internal=false. Disabled for ranged descriptors"},

0 commit comments

Comments
 (0)