mirror of
https://github.com/XRPLF/rippled.git
synced 2026-07-24 23:50:22 +00:00
chore: Enable clang-tidy bugprone-unused-raii check (#6505)
This commit is contained in:
@@ -67,6 +67,7 @@ Checks: "-*,
|
||||
bugprone-unhandled-self-assignment,
|
||||
bugprone-unique-ptr-array-mismatch,
|
||||
bugprone-unsafe-functions,
|
||||
bugprone-unused-raii,
|
||||
bugprone-unused-local-non-trivial-variable,
|
||||
bugprone-virtual-near-miss,
|
||||
cppcoreguidelines-no-suspend-with-lock,
|
||||
|
||||
@@ -39,9 +39,9 @@ public:
|
||||
a = std::move(b);
|
||||
Account c(std::move(a));
|
||||
}
|
||||
Account("alice");
|
||||
Account("alice", KeyType::secp256k1);
|
||||
Account("alice", KeyType::ed25519);
|
||||
Account("alice"); // NOLINT(bugprone-unused-raii)
|
||||
Account("alice", KeyType::secp256k1); // NOLINT(bugprone-unused-raii)
|
||||
Account("alice", KeyType::ed25519); // NOLINT(bugprone-unused-raii)
|
||||
auto const gw = Account("gw");
|
||||
[](AccountID) {}(gw);
|
||||
auto const USD = gw["USD"];
|
||||
@@ -56,11 +56,11 @@ public:
|
||||
{
|
||||
using namespace jtx;
|
||||
|
||||
PrettyAmount(0);
|
||||
PrettyAmount(1);
|
||||
PrettyAmount(0u);
|
||||
PrettyAmount(1u);
|
||||
PrettyAmount(-1);
|
||||
PrettyAmount(0); // NOLINT(bugprone-unused-raii)
|
||||
PrettyAmount(1); // NOLINT(bugprone-unused-raii)
|
||||
PrettyAmount(0u); // NOLINT(bugprone-unused-raii)
|
||||
PrettyAmount(1u); // NOLINT(bugprone-unused-raii)
|
||||
PrettyAmount(-1); // NOLINT(bugprone-unused-raii)
|
||||
static_assert(!std::is_trivially_constructible<PrettyAmount, char>::value, "");
|
||||
static_assert(!std::is_trivially_constructible<PrettyAmount, unsigned char>::value, "");
|
||||
static_assert(!std::is_trivially_constructible<PrettyAmount, short>::value, "");
|
||||
|
||||
Reference in New Issue
Block a user