2
0
mirror of https://gitlab.isc.org/isc-projects/kea synced 2025-08-30 05:27:55 +00:00

[#3207] Change the member names

This commit is contained in:
Slawek Figiel 2024-02-20 09:04:35 +01:00
parent 27ad5f8d48
commit e767fca448

View File

@ -193,27 +193,27 @@ public:
/// \param max maximum number generated. /// \param max maximum number generated.
RandomGenerator(uint32_t min, uint32_t max) : RandomGenerator(uint32_t min, uint32_t max) :
NumberGenerator(), NumberGenerator(),
distribution(min, max) { distribution_(min, max) {
// Initialize the randomness source with the current time. // Initialize the randomness source with the current time.
randomness_generator.seed(time(0)); randomness_generator_.seed(time(0));
} }
/// \brief Generate number in range of [min, max]. /// \brief Generate number in range of [min, max].
/// ///
/// \return generated number. /// \return generated number.
virtual uint32_t generate() { virtual uint32_t generate() {
return distribution(randomness_generator); return distribution_(randomness_generator_);
} }
private: private:
/// \brief The random values will be uniformly distributed in /// \brief The random values will be uniformly distributed in
/// the range provided in the constructor. /// the range provided in the constructor.
std::uniform_int_distribution<> distribution; std::uniform_int_distribution<> distribution_;
/// \brief It is a high quality general-purpose random /// \brief It is a high quality general-purpose random
/// generator. It isn't suitable for cryptographic use but is /// generator. It isn't suitable for cryptographic use but is
/// good enough for testing. /// good enough for testing.
std::mt19937 randomness_generator; std::mt19937 randomness_generator_;
}; };
/// \brief Length of the Ethernet HW address (MAC) in bytes. /// \brief Length of the Ethernet HW address (MAC) in bytes.