From 136610d5fdfd49b2bf8bad6337432815160173c2 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Sun, 15 Nov 2026 00:57:18 -0600 Subject: [PATCH] Fix variable shadowing in BandwidthTracker constructor --- app/streaming/bandwidth.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/streaming/bandwidth.cpp b/app/streaming/bandwidth.cpp index cb3dfe3d..a5608dbc 100644 --- a/app/streaming/bandwidth.cpp +++ b/app/streaming/bandwidth.cpp @@ -4,12 +4,9 @@ using namespace std::chrono; BandwidthTracker::BandwidthTracker(uint32_t windowSeconds, uint32_t bucketIntervalMs) : windowSeconds(seconds(windowSeconds)), - bucketIntervalMs(bucketIntervalMs) + bucketIntervalMs(bucketIntervalMs == 0 ? 250 : bucketIntervalMs) { - if (bucketIntervalMs <= 0) { - bucketIntervalMs = 250; - } - bucketCount = (windowSeconds * 1000) / bucketIntervalMs; + bucketCount = (windowSeconds * 1000) / this->bucketIntervalMs; buckets.resize(bucketCount); }