refactor: non-semantic cleanup

This commit is contained in:
surtur 2021-12-29 03:55:01 +01:00
parent 2086861776
commit b5601acfbd
Signed by: wanderer
GPG Key ID: 19CE1EC1D9E0486D
2 changed files with 3 additions and 8 deletions

View File

@ -5,12 +5,8 @@
#include "util.h"
#include <cryptopp/cryptlib.h>
#include <fmt/core.h>
#include <fmt/chrono.h>
#include <chrono>
namespace fortuna {
static constexpr const unsigned int min_pool_size{64};
@ -29,7 +25,7 @@ namespace fortuna {
const auto start{std::chrono::system_clock::now()};
fmt::print("random_data starting - {}\n", start);
auto now{std::chrono::steady_clock::now()};
auto elapsed{
auto elapsed {
std::chrono::duration_cast<std::chrono::milliseconds>(
std::chrono::steady_clock::now().time_since_epoch() -
now.time_since_epoch()
@ -40,7 +36,6 @@ namespace fortuna {
std::string s;
if (R.pools[0].get_s_length() >= min_pool_size && elapsed > R.Gen.reseed_interval) {
#pragma omp parallel for
for (int i = 0; i < static_cast<int>(pools_to_use); ++i) {
if (R.reseed_ctr % static_cast<int>(pow(2,i)) == 0) {
try {

View File

@ -45,13 +45,13 @@ public:
fmt::print("{}\n", e.what());
}
fmt::print("PRNG initialized\n");
};
}
// PRNG state
class R_state {
friend fortuna::Fortuna;
public:
R_state(){};
R_state(){}
~R_state() = default;
protected: