1
0
mirror of https://github.com/Zygo/bees.git synced 2025-05-17 21:35:45 +02:00

crucible: time: fix uninitialized member

Found by valgrind.  It was mostly harmless because the range of
usable values is limited by m_burst (which was initialized) and 0.

Signed-off-by: Zygo Blaxell <bees@furryterror.org>
This commit is contained in:
Zygo Blaxell 2017-01-16 22:02:14 -05:00
parent 9f120e326b
commit 6cc9b267ef

View File

@ -32,10 +32,11 @@ namespace crucible {
Timer m_timer;
double m_rate;
double m_burst;
double m_tokens;
double m_tokens = 0.0;
mutex m_mutex;
void update_tokens();
RateLimiter() = delete;
public:
RateLimiter(double rate, double burst);
RateLimiter(double rate);