mirror of https://github.com/AxioDL/metaforce.git
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:
parent
71399d0944
commit
488e377374
|
@ -31,9 +31,8 @@ s16 CRumbleVoice::GetFreeChannel() const {
|
|||
}
|
||||
|
||||
float CRumbleVoice::GetIntensity() const {
|
||||
return std::min(2.f, std::max(x10_deltas[0].x0_curIntensity,
|
||||
std::max(x10_deltas[1].x0_curIntensity,
|
||||
std::max(x10_deltas[2].x0_curIntensity, x10_deltas[3].x0_curIntensity))));
|
||||
return std::min(2.f, std::max({x10_deltas[0].x0_curIntensity, x10_deltas[1].x0_curIntensity,
|
||||
x10_deltas[2].x0_curIntensity, x10_deltas[3].x0_curIntensity}));
|
||||
}
|
||||
|
||||
bool CRumbleVoice::UpdateChannel(SAdsrDelta& delta, const SAdsrData& data, float dt) {
|
||||
|
|
Loading…
Reference in New Issue