chore: Enable most cppcoreguidelines checks (#7660)

This commit is contained in:
Ayaz Salikhov
2026-07-07 14:12:52 +01:00
committed by GitHub
parent f5e63f8a91
commit c5a6de6ef7
29 changed files with 86 additions and 74 deletions

View File

@@ -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)