From a0df93c9ecdb07204ebb4ca71f037d1e753d09a1 Mon Sep 17 00:00:00 2001 From: surtur Date: Thu, 13 Jan 2022 06:04:18 +0100 Subject: [PATCH] clang-format: BinPack{Arguments,Parameters}: false --- .clang-format | 2 ++ fortuna.cpp | 6 ++++-- fortuna.h | 3 ++- generator.cpp | 6 ++++-- seed_file_management.cpp | 4 +++- 5 files changed, 15 insertions(+), 6 deletions(-) diff --git a/.clang-format b/.clang-format index 331bc24..45a3b15 100644 --- a/.clang-format +++ b/.clang-format @@ -15,6 +15,8 @@ AllowShortLambdasOnASingleLine: All AllowShortLoopsOnASingleLine: false AlwaysBreakAfterReturnType: None AlwaysBreakTemplateDeclarations: Yes +BinPackArguments: false +BinPackParameters: false BreakBeforeBraces: Custom BraceWrapping: AfterCaseLabel: false diff --git a/fortuna.cpp b/fortuna.cpp index 2c61656..857ae6d 100644 --- a/fortuna.cpp +++ b/fortuna.cpp @@ -25,7 +25,8 @@ Fortuna::Fortuna() { catch (CryptoPP::Exception& e) { 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()); th_accu = std::thread(&Fortuna::accumulator_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 { std::string n{R.Gen.generate_random_data(n_bytes)}; fmt::print("got you {} proper bytes from generate_random_data -> {}\n", - n_bytes, n); + n_bytes, + n); n.clear(); } diff --git a/fortuna.h b/fortuna.h index e95f1cd..c3bc9f8 100644 --- a/fortuna.h +++ b/fortuna.h @@ -85,7 +85,8 @@ public: auto initialize_pools() -> void { for (unsigned int i = accumulator::Accumulator::init_pool_num; - i < num_of_pools; ++i) { + i < num_of_pools; + ++i) { pools[i].initialize_pool(i); } } diff --git a/generator.cpp b/generator.cpp index 9e39165..d20b120 100644 --- a/generator.cpp +++ b/generator.cpp @@ -103,7 +103,8 @@ auto Generator::do_crypto() -> std::string { // the "true" param - pump all of the data immediately to its // attached transformation CryptoPP::StringSource str_src1( - plain, true, + plain, + true, new CryptoPP::StreamTransformationFilter( e, new CryptoPP::StringSink(cipher)) // StreamTransformationFilter @@ -116,7 +117,8 @@ auto Generator::do_crypto() -> std::string { // Pretty print cipher text CryptoPP::StringSource str_src2( - cipher, true, + cipher, + true, new CryptoPP::HexEncoder( new CryptoPP::StringSink(encoded_c)) // HexEncoder ); // StringSource diff --git a/seed_file_management.cpp b/seed_file_management.cpp index 2eecbba..1c6bbce 100644 --- a/seed_file_management.cpp +++ b/seed_file_management.cpp @@ -55,7 +55,9 @@ auto SeedFileManager::update_seed_file() -> void { if (static_cast(f_stream.gcount()) != config.seed_f_length) { 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); throw std::runtime_error(msg); }