CRumbleVoice: Collapse repeated std::max calls in GetIntensity()

We can make use of the std::max overload that takes an initializer list.
This commit is contained in:
Lioncash 2020-03-18 00:34:26 -04:00
parent 71399d0944
commit 488e377374
1 changed files with 2 additions and 3 deletions

View File

@ -31,9 +31,8 @@ s16 CRumbleVoice::GetFreeChannel() const {
} }
float CRumbleVoice::GetIntensity() const { float CRumbleVoice::GetIntensity() const {
return std::min(2.f, std::max(x10_deltas[0].x0_curIntensity, return std::min(2.f, std::max({x10_deltas[0].x0_curIntensity, x10_deltas[1].x0_curIntensity,
std::max(x10_deltas[1].x0_curIntensity, x10_deltas[2].x0_curIntensity, x10_deltas[3].x0_curIntensity}));
std::max(x10_deltas[2].x0_curIntensity, x10_deltas[3].x0_curIntensity))));
} }
bool CRumbleVoice::UpdateChannel(SAdsrDelta& delta, const SAdsrData& data, float dt) { bool CRumbleVoice::UpdateChannel(SAdsrDelta& delta, const SAdsrData& data, float dt) {