mirror of
https://github.com/cookiengineer/audacity
synced 2026-04-15 02:30:44 +02:00
Make many conversions sampleCount->size_t are explicit and checked...
... with run-time assertions. I examined each place and reasoned that the narrowing was safe, and commented why so. Again, there are places where the sampleCount variable will later be changed to have a different type, and they are not changed here.
This commit is contained in:
@@ -569,7 +569,8 @@ void FreqWindow::GetAudio()
|
||||
mDataLen = 10485760;
|
||||
}
|
||||
else
|
||||
mDataLen = dataLen;
|
||||
// dataLen is not more than 10 * 2 ^ 20
|
||||
mDataLen = dataLen.as_size_t();
|
||||
mData = new float[mDataLen];
|
||||
track->Get((samplePtr)mData, floatSample, start, mDataLen);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user