mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-11-28 08:43:57 +00:00
Fix variable shadowing in BandwidthTracker constructor
This commit is contained in:
1 parent
bd405f57ca
commit
136610d5fd
1 file changed
+2
-5
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user