Skip to content

Commit 1220d63

Browse files
authored
style: Fix lint comments due to style changes (#2963)
1 parent e9052bc commit 1220d63

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

src/etl/NFTHelpers.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,20 +137,19 @@ getNFTokenMintData(ripple::TxMeta const& txMeta, ripple::STTx const& sttx)
137137

138138
// Find the first NFT ID that doesn't match. We're looking for an
139139
// added NFT, so the one we want will be the mismatch in finalIDs.
140-
// NOLINTNEXTLINE(modernize-use-ranges)
141-
auto const diff = std::ranges::mismatch(finalIDs, prevIDs);
140+
auto const [finalMismatch, prevMismatch] = std::ranges::mismatch(finalIDs, prevIDs);
142141

143142
// There should always be a difference so the returned finalIDs
144143
// iterator should never be end(). But better safe than sorry.
145-
if (finalIDs.size() != prevIDs.size() + 1 || diff.in1 == finalIDs.end() || !owner) {
144+
if (finalIDs.size() != prevIDs.size() + 1 || finalMismatch == finalIDs.end() || !owner) {
146145
throw std::runtime_error(
147146
fmt::format(" - unexpected NFTokenMint data in tx {}", strHex(sttx.getTransactionID()))
148147
);
149148
}
150149

151150
return {
152-
{NFTTransactionsData(*diff.in1, txMeta, sttx.getTransactionID())},
153-
NFTsData(*diff.in1, *owner, sttx.getFieldVL(ripple::sfURI), txMeta)
151+
{NFTTransactionsData(*finalMismatch, txMeta, sttx.getTransactionID())},
152+
NFTsData(*finalMismatch, *owner, sttx.getFieldVL(ripple::sfURI), txMeta)
154153
};
155154
}
156155

tests/unit/app/CliArgsTests.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,10 @@ TEST_F(CliArgsTests, Parse_Config)
116116
{
117117
std::string_view configPath = "some_config_path";
118118
std::array argv{
119-
"clio_server", "--conf", configPath.data()
120-
}; // NOLINT(bugprone-suspicious-stringview-data-usage)
119+
"clio_server",
120+
"--conf",
121+
configPath.data() // NOLINT(bugprone-suspicious-stringview-data-usage)
122+
};
121123
auto const action = CliArgs::parse(argv.size(), argv.data());
122124

123125
int const returnCode = 123;
@@ -140,8 +142,10 @@ TEST_F(CliArgsTests, Parse_VerifyConfig)
140142
{
141143
std::string_view configPath = "some_config_path";
142144
std::array argv{
143-
"clio_server", configPath.data(), "--verify"
144-
}; // NOLINT(bugprone-suspicious-stringview-data-usage)
145+
"clio_server",
146+
configPath.data(), // NOLINT(bugprone-suspicious-stringview-data-usage)
147+
"--verify"
148+
};
145149
auto const action = CliArgs::parse(argv.size(), argv.data());
146150

147151
int const returnCode = 123;

tests/unit/web/RPCServerHandlerTests.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,8 @@ struct MockWsBase : public web::ConnectionBase {
7070
}
7171

7272
void
73-
// NOLINTNEXTLINE(cppcoreguidelines-rvalue-reference-param-not-moved)
7473
send(
75-
std::string&& msg,
74+
std::string&& msg, // NOLINT(cppcoreguidelines-rvalue-reference-param-not-moved)
7675
boost::beast::http::status status = boost::beast::http::status::ok
7776
) override
7877
{

0 commit comments

Comments
 (0)