From ec7bca8c20a422b0b1c866831f7d4f51be1bd697 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 17 Mar 2020 20:54:53 -0400 Subject: [PATCH] CLight: Collapse std::max calls into one We can use the overload that takes an initializer list to make it easier to read. --- Runtime/Graphics/CLight.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Runtime/Graphics/CLight.cpp b/Runtime/Graphics/CLight.cpp index 1eae4ab02..a5de5e03a 100644 --- a/Runtime/Graphics/CLight.cpp +++ b/Runtime/Graphics/CLight.cpp @@ -32,7 +32,7 @@ float CLight::GetIntensity() const { if (x1c_type == ELightType::Custom) { 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; }