2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-05-14 21:51:21 +00:00

CLight: Collapse std::max calls into one

We can use the overload that takes an initializer list to make it easier
to read.
This commit is contained in:
Lioncash 2020-03-17 20:54:53 -04:00
parent e821f736de
commit ec7bca8c20

View File

@ -32,7 +32,7 @@ float CLight::GetIntensity() const {
if (x1c_type == ELightType::Custom) { if (x1c_type == ELightType::Custom) {
coef = x30_angleC; coef = x30_angleC;
} }
x48_cachedIntensity = coef * std::max(x18_color.r(), std::max(x18_color.g(), x18_color.b())); x48_cachedIntensity = coef * std::max({x18_color.r(), x18_color.g(), x18_color.b()});
} }
return x48_cachedIntensity; return x48_cachedIntensity;
} }