clang-format: BinPack{Arguments,Parameters}: false
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
surtur 2022-01-13 06:04:18 +01:00
parent 03578f9016
commit a0df93c9ec
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D
5 changed files with 15 additions and 6 deletions

View File

@ -15,6 +15,8 @@ AllowShortLambdasOnASingleLine: All
AllowShortLoopsOnASingleLine: false AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterReturnType: None AlwaysBreakAfterReturnType: None
AlwaysBreakTemplateDeclarations: Yes AlwaysBreakTemplateDeclarations: Yes
BinPackArguments: false
BinPackParameters: false
BreakBeforeBraces: Custom BreakBeforeBraces: Custom
BraceWrapping: BraceWrapping:
AfterCaseLabel: false AfterCaseLabel: false

View File

@ -25,7 +25,8 @@ Fortuna::Fortuna() {
catch (CryptoPP::Exception& e) { catch (CryptoPP::Exception& e) {
fmt::print(stderr, "{}\n", e.what()); fmt::print(stderr, "{}\n", e.what());
} }
th_gen = std::thread(&Fortuna::generator_service, this, th_gen = std::thread(&Fortuna::generator_service,
this,
std::make_shared<fortuna::generator::Generator>()); std::make_shared<fortuna::generator::Generator>());
th_accu = std::thread(&Fortuna::accumulator_service, this); th_accu = std::thread(&Fortuna::accumulator_service, this);
th_sfm = std::thread(&Fortuna::seed_file_manager_service, this); th_sfm = std::thread(&Fortuna::seed_file_manager_service, this);
@ -82,7 +83,8 @@ auto Fortuna::random_data(unsigned int n_bytes) -> void {
else { else {
std::string n{R.Gen.generate_random_data(n_bytes)}; std::string n{R.Gen.generate_random_data(n_bytes)};
fmt::print("got you {} proper bytes from generate_random_data -> {}\n", fmt::print("got you {} proper bytes from generate_random_data -> {}\n",
n_bytes, n); n_bytes,
n);
n.clear(); n.clear();
} }

View File

@ -85,7 +85,8 @@ public:
auto initialize_pools() -> void { auto initialize_pools() -> void {
for (unsigned int i = accumulator::Accumulator::init_pool_num; for (unsigned int i = accumulator::Accumulator::init_pool_num;
i < num_of_pools; ++i) { i < num_of_pools;
++i) {
pools[i].initialize_pool(i); pools[i].initialize_pool(i);
} }
} }

View File

@ -103,7 +103,8 @@ auto Generator::do_crypto() -> std::string {
// the "true" param - pump all of the data immediately to its // the "true" param - pump all of the data immediately to its
// attached transformation // attached transformation
CryptoPP::StringSource str_src1( CryptoPP::StringSource str_src1(
plain, true, plain,
true,
new CryptoPP::StreamTransformationFilter( new CryptoPP::StreamTransformationFilter(
e, e,
new CryptoPP::StringSink(cipher)) // StreamTransformationFilter new CryptoPP::StringSink(cipher)) // StreamTransformationFilter
@ -116,7 +117,8 @@ auto Generator::do_crypto() -> std::string {
// Pretty print cipher text // Pretty print cipher text
CryptoPP::StringSource str_src2( CryptoPP::StringSource str_src2(
cipher, true, cipher,
true,
new CryptoPP::HexEncoder( new CryptoPP::HexEncoder(
new CryptoPP::StringSink(encoded_c)) // HexEncoder new CryptoPP::StringSink(encoded_c)) // HexEncoder
); // StringSource ); // StringSource

View File

@ -55,7 +55,9 @@ auto SeedFileManager::update_seed_file() -> void {
if (static_cast<std::size_t>(f_stream.gcount()) != if (static_cast<std::size_t>(f_stream.gcount()) !=
config.seed_f_length) { config.seed_f_length) {
std::string msg{"error reading seed from file"}; std::string msg{"error reading seed from file"};
fmt::print("{} {}, length: {}\n", msg, config.seed_f_path, fmt::print("{} {}, length: {}\n",
msg,
config.seed_f_path,
config.seed_f_length); config.seed_f_length);
throw std::runtime_error(msg); throw std::runtime_error(msg);
} }