From ae87f5037a420a13454ea3eec22ea0c441f56355 Mon Sep 17 00:00:00 2001 From: Justin Gottula Date: Wed, 31 Jul 2019 14:42:04 -0700 Subject: [PATCH] Refactor #9676: Use compound assignment operators for trivial cases --- src/openrct2/ride/RideRatings.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openrct2/ride/RideRatings.cpp b/src/openrct2/ride/RideRatings.cpp index facef86759..d48e7ddfa1 100644 --- a/src/openrct2/ride/RideRatings.cpp +++ b/src/openrct2/ride/RideRatings.cpp @@ -838,8 +838,8 @@ static uint16_t ride_compute_upkeep(Ride* ride) uint16_t trackCost = costPerTrackPiece[ride->type]; uint8_t dl = ride->drops; - dl = dl >> 6; - dl = dl & 3; + dl >>= 6; + dl &= 3; upkeep += trackCost * dl; uint32_t totalLength = ride_get_total_length(ride) >> 16; @@ -908,8 +908,8 @@ static uint16_t ride_compute_upkeep(Ride* ride) } // multiply by 5/8 - upkeep = upkeep * 10; - upkeep = upkeep >> 4; + upkeep *= 10; + upkeep >>= 4; return upkeep; }