mirror of
https://github.com/Zygo/bees.git
synced 2025-06-16 09:36:17 +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:
@ -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);
|
||||
|
Reference in New Issue
Block a user