accumulator: add noexcept where reasonable
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
74f8af7bfc
commit
df4c9d7bdb
|
@ -29,17 +29,17 @@ Accumulator::Accumulator() noexcept {
|
|||
Accumulator::~Accumulator() noexcept {}
|
||||
|
||||
|
||||
auto Accumulator::set_reseed_ctr_to_null() -> void {
|
||||
auto Accumulator::set_reseed_ctr_to_null() noexcept -> void {
|
||||
std::lock_guard<std::mutex> lg(mtx);
|
||||
this->reseed_ctr = 0x00;
|
||||
}
|
||||
|
||||
auto Accumulator::incr_reseed_ctr() -> void {
|
||||
auto Accumulator::incr_reseed_ctr() noexcept -> void {
|
||||
std::lock_guard<std::mutex> lg(mtx);
|
||||
{ ++this->reseed_ctr; }
|
||||
}
|
||||
|
||||
auto Accumulator::get_reseed_ctr() const -> uint64_t {
|
||||
auto Accumulator::get_reseed_ctr() const noexcept -> uint64_t {
|
||||
std::lock_guard<std::mutex> lg(mtx);
|
||||
return this->reseed_ctr;
|
||||
}
|
||||
|
@ -54,7 +54,7 @@ auto Accumulator::_p_pools_equal(
|
|||
}
|
||||
|
||||
// check if given source id is an id of an already registered entropy source
|
||||
auto Accumulator::src_is_registered(const uint8_t& id) -> bool {
|
||||
auto Accumulator::src_is_registered(const uint8_t& id) noexcept -> bool {
|
||||
std::atomic<bool> reg{false};
|
||||
static uint8_t _src_id{};
|
||||
|
||||
|
@ -77,7 +77,7 @@ auto Accumulator::src_is_registered(const uint8_t& id) -> bool {
|
|||
|
||||
auto Accumulator::set_pools_ptr(
|
||||
std::shared_ptr<std::array<accumulator::Pool, Accumulator::NUM_OF_POOLS>>
|
||||
p_pools) -> void {
|
||||
p_pools) noexcept -> void {
|
||||
this->_p_pools = p_pools;
|
||||
}
|
||||
|
||||
|
|
|
@ -37,11 +37,11 @@ protected:
|
|||
public:
|
||||
constexpr static const unsigned int init_pool_num{0};
|
||||
|
||||
auto set_reseed_ctr_to_null() -> void;
|
||||
auto set_reseed_ctr_to_null() noexcept -> void;
|
||||
|
||||
auto incr_reseed_ctr() -> void;
|
||||
auto incr_reseed_ctr() noexcept -> void;
|
||||
|
||||
auto get_reseed_ctr() const -> uint64_t;
|
||||
auto get_reseed_ctr() const noexcept -> uint64_t;
|
||||
|
||||
auto _p_pools_equal(
|
||||
std::shared_ptr<std::array<accumulator::Pool,
|
||||
|
@ -65,12 +65,11 @@ public:
|
|||
}
|
||||
}
|
||||
|
||||
[[maybe_unused]] auto src_is_registered(const uint8_t& id) -> bool;
|
||||
[[maybe_unused]] auto src_is_registered(const uint8_t& id) noexcept -> bool;
|
||||
|
||||
auto set_pools_ptr(
|
||||
std::shared_ptr<
|
||||
std::array<accumulator::Pool, Accumulator::NUM_OF_POOLS>> p_pools)
|
||||
-> void;
|
||||
auto set_pools_ptr(std::shared_ptr<
|
||||
std::array<accumulator::Pool, Accumulator::NUM_OF_POOLS>>
|
||||
p_pools) noexcept -> void;
|
||||
|
||||
auto set_gen(fortuna::generator::Generator& Gen) -> void;
|
||||
|
||||
|
|
Reference in New Issue