From e0601296a9ff4d3dd5a0b4b417192b6286f2aa21 Mon Sep 17 00:00:00 2001 From: asm95 Date: Tue, 17 Aug 2021 20:25:37 -0300 Subject: [PATCH] [lcs] corrections for CScrollBar (code style) Changes were made to be compliant with the coding style: - All floats should be explicit by specifying "f" suffix so compiler doesn't use double as default - Changed the conditional order to be more clear about what the "if" chain trying to achieve Thanks Nick007J --- src/renderer/Fluff.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/renderer/Fluff.cpp b/src/renderer/Fluff.cpp index c532c7c1..59464584 100644 --- a/src/renderer/Fluff.cpp +++ b/src/renderer/Fluff.cpp @@ -746,13 +746,12 @@ void CScrollBar::Update() case 3: m_pMessage = "CONGESTION EASING . . . "; break; case 4: - if (CWeather::Foggyness <= 0.5) - if (CWeather::WetRoads <= 0.5) - m_pMessage = "CAUTION: CARJACKING CRIME WAVE HITS CITY . . . HAVE A NICE DAY . . . "; - else - m_pMessage = "SNOW EXPECTED ! "; - else + if (CWeather::Foggyness > 0.5f) m_pMessage = "VISIBILITY LOW ! "; + else if (CWeather::WetRoads > 0.5f) + m_pMessage = "SNOW EXPECTED ! "; + else + m_pMessage = "CAUTION: CARJACKING CRIME WAVE HITS CITY . . . HAVE A NICE DAY . . . "; break; case 5: m_pMessage = FindTunnelMessage(); break;