mirror of
https://github.com/XRPLF/rippled.git
synced 2026-08-23 15:20:54 +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)
|
||||
|
||||
Reference in New Issue
Block a user