gen: simplify time_to_reseed() return logic
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
674ceedc4a
commit
606527618d
|
@ -60,12 +60,7 @@ auto Generator::time_to_reseed(
|
||||||
const std::chrono::milliseconds& gen_reseed_interval) const -> bool {
|
const std::chrono::milliseconds& gen_reseed_interval) const -> bool {
|
||||||
std::lock_guard<std::recursive_mutex> lg(mtx);
|
std::lock_guard<std::recursive_mutex> lg(mtx);
|
||||||
|
|
||||||
if (pool0_len >= min_p_size && time_elapsed > gen_reseed_interval) {
|
return (pool0_len >= min_p_size && time_elapsed > gen_reseed_interval);
|
||||||
return true;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
auto Generator::reseed(const std::string& s) -> void {
|
auto Generator::reseed(const std::string& s) -> void {
|
||||||
|
|
Reference in New Issue