mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-23 07:10:53 +00:00
chore: Enable most cppcoreguidelines checks (#7660)
This commit is contained in:
@@ -40,7 +40,6 @@
|
||||
#include <cassert>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <cstdio>
|
||||
#include <initializer_list>
|
||||
#include <optional>
|
||||
#include <stdexcept>
|
||||
@@ -309,31 +308,26 @@ struct ExistingElementPool
|
||||
currencyNames.clear();
|
||||
currencyNames.reserve(numCur);
|
||||
|
||||
static constexpr size_t kBufSize = 32;
|
||||
char buf[kBufSize];
|
||||
|
||||
for (size_t id = 0; id < numAct; ++id)
|
||||
{
|
||||
snprintf(buf, kBufSize, "A%zu", id);
|
||||
accounts.emplace_back(buf);
|
||||
}
|
||||
accounts.emplace_back("A" + std::to_string(id));
|
||||
|
||||
for (size_t id = 0; id < numCur; ++id)
|
||||
{
|
||||
std::string name;
|
||||
if (id < 10)
|
||||
{
|
||||
snprintf(buf, kBufSize, "CC%zu", id);
|
||||
name = "CC" + std::to_string(id);
|
||||
}
|
||||
else if (id < 100)
|
||||
{
|
||||
snprintf(buf, kBufSize, "C%zu", id);
|
||||
name = "C" + std::to_string(id);
|
||||
}
|
||||
else
|
||||
{
|
||||
snprintf(buf, kBufSize, "%zu", id);
|
||||
name = std::to_string(id);
|
||||
}
|
||||
currencies.emplace_back(toCurrency(buf));
|
||||
currencyNames.emplace_back(buf);
|
||||
currencies.emplace_back(toCurrency(name));
|
||||
currencyNames.emplace_back(name);
|
||||
}
|
||||
|
||||
for (auto const& a : accounts)
|
||||
|
||||
@@ -245,9 +245,9 @@ struct Balance
|
||||
T& env;
|
||||
STAmount startAmount;
|
||||
|
||||
Balance(T& env, jtx::Account const& account) : account(account), env(env)
|
||||
Balance(T& env, jtx::Account const& account)
|
||||
: account(account), env(env), startAmount(env.balance(account))
|
||||
{
|
||||
startAmount = env.balance(account);
|
||||
}
|
||||
|
||||
[[nodiscard]] STAmount
|
||||
|
||||
Reference in New Issue
Block a user