mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-12-03 19:52:09 +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)
|
BandwidthTracker::BandwidthTracker(uint32_t windowSeconds, uint32_t bucketIntervalMs)
|
||||||
: windowSeconds(seconds(windowSeconds)),
|
: windowSeconds(seconds(windowSeconds)),
|
||||||
bucketIntervalMs(bucketIntervalMs)
|
bucketIntervalMs(bucketIntervalMs == 0 ? 250 : bucketIntervalMs)
|
||||||
{
|
{
|
||||||
if (bucketIntervalMs <= 0) {
|
bucketCount = (windowSeconds * 1000) / this->bucketIntervalMs;
|
||||||
bucketIntervalMs = 250;
|
|
||||||
}
|
|
||||||
bucketCount = (windowSeconds * 1000) / bucketIntervalMs;
|
|
||||||
buckets.resize(bucketCount);
|
buckets.resize(bucketCount);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user