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:
parent
9f120e326b
commit
6cc9b267ef
@ -32,10 +32,11 @@ namespace crucible {
|
|||||||
Timer m_timer;
|
Timer m_timer;
|
||||||
double m_rate;
|
double m_rate;
|
||||||
double m_burst;
|
double m_burst;
|
||||||
double m_tokens;
|
double m_tokens = 0.0;
|
||||||
mutex m_mutex;
|
mutex m_mutex;
|
||||||
|
|
||||||
void update_tokens();
|
void update_tokens();
|
||||||
|
RateLimiter() = delete;
|
||||||
public:
|
public:
|
||||||
RateLimiter(double rate, double burst);
|
RateLimiter(double rate, double burst);
|
||||||
RateLimiter(double rate);
|
RateLimiter(double rate);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user