mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-02-01 03:10:06 +00:00
Minor code modernisations.
This commit is contained in:
parent
f3b46c9a2f
commit
b2e5ef2bd6
17 changed files with 104 additions and 96 deletions
|
|
@ -676,11 +676,11 @@ void AudioSampleBuffer::writeToAudioWriter (AudioFormatWriter* writer,
|
|||
const double samp = src[i];
|
||||
|
||||
if (samp <= -1.0)
|
||||
dest[i] = INT_MIN;
|
||||
dest[i] = std::numeric_limits<int>::min();
|
||||
else if (samp >= 1.0)
|
||||
dest[i] = INT_MAX;
|
||||
dest[i] = std::numeric_limits<int>::max();
|
||||
else
|
||||
dest[i] = roundToInt (INT_MAX * samp);
|
||||
dest[i] = roundToInt (std::numeric_limits<int>::max() * samp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue