From 4328a355c0f11a2faefaedd2d2ed4dfdf6a14c15 Mon Sep 17 00:00:00 2001 From: Hielke Morsink Date: Tue, 5 Apr 2022 19:14:14 +0200 Subject: [PATCH] Apply coding style to surrounding variables --- src/openrct2/entity/Peep.cpp | 94 ++++++++++++++++++------------------ 1 file changed, 47 insertions(+), 47 deletions(-) diff --git a/src/openrct2/entity/Peep.cpp b/src/openrct2/entity/Peep.cpp index 8d20414bed..f95c868104 100644 --- a/src/openrct2/entity/Peep.cpp +++ b/src/openrct2/entity/Peep.cpp @@ -1008,9 +1008,9 @@ void Peep::Update() void peep_problem_warnings_update() { Ride* ride; - uint32_t hunger_counter = 0, lost_counter = 0, noexit_counter = 0, thirst_counter = 0, litter_counter = 0, - disgust_counter = 0, toilet_counter = 0, vandalism_counter = 0; - uint8_t* warning_throttle = gPeepWarningThrottle; + uint32_t hungerCounter = 0, lostCounter = 0, noexitCounter = 0, thirstCounter = 0, litterCounter = 0, disgustCounter = 0, + toiletCounter = 0, vandalismCounter = 0; + uint8_t* warningThrottle = gPeepWarningThrottle; int32_t inQueueCounter = 0; int32_t tooLongQueueCounter = 0; @@ -1030,53 +1030,53 @@ void peep_problem_warnings_update() switch (peep->Thoughts[0].type) { case PeepThoughtType::Lost: // 0x10 - lost_counter++; + lostCounter++; break; case PeepThoughtType::Hungry: // 0x14 if (peep->GuestHeadingToRideId.IsNull()) { - hunger_counter++; + hungerCounter++; break; } ride = get_ride(peep->GuestHeadingToRideId); if (ride != nullptr && !ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_FLAT_RIDE)) - hunger_counter++; + hungerCounter++; break; case PeepThoughtType::Thirsty: if (peep->GuestHeadingToRideId.IsNull()) { - thirst_counter++; + thirstCounter++; break; } ride = get_ride(peep->GuestHeadingToRideId); if (ride != nullptr && !ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_SELLS_DRINKS)) - thirst_counter++; + thirstCounter++; break; case PeepThoughtType::Toilet: if (peep->GuestHeadingToRideId.IsNull()) { - toilet_counter++; + toiletCounter++; break; } ride = get_ride(peep->GuestHeadingToRideId); if (ride != nullptr && !ride->GetRideTypeDescriptor().HasFlag(RIDE_TYPE_FLAG_IS_TOILET)) - toilet_counter++; + toiletCounter++; break; case PeepThoughtType::BadLitter: // 0x1a - litter_counter++; + litterCounter++; break; case PeepThoughtType::CantFindExit: // 0x1b - noexit_counter++; + noexitCounter++; break; case PeepThoughtType::PathDisgusting: // 0x1f - disgust_counter++; + disgustCounter++; break; case PeepThoughtType::Vandalism: // 0x21 - vandalism_counter++; + vandalismCounter++; break; case PeepThoughtType::QueuingAges: tooLongQueueCounter++; @@ -1087,11 +1087,11 @@ void peep_problem_warnings_update() } } // could maybe be packed into a loop, would lose a lot of clarity though - if (warning_throttle[0]) - --warning_throttle[0]; - else if (hunger_counter >= PEEP_HUNGER_WARNING_THRESHOLD && hunger_counter >= gNumGuestsInPark / 16) + if (warningThrottle[0]) + --warningThrottle[0]; + else if (hungerCounter >= PEEP_HUNGER_WARNING_THRESHOLD && hungerCounter >= gNumGuestsInPark / 16) { - warning_throttle[0] = 4; + warningThrottle[0] = 4; if (gConfigNotifications.guest_warnings) { constexpr auto thoughtId = static_cast(PeepThoughtType::Hungry); @@ -1099,11 +1099,11 @@ void peep_problem_warnings_update() } } - if (warning_throttle[1]) - --warning_throttle[1]; - else if (thirst_counter >= PEEP_THIRST_WARNING_THRESHOLD && thirst_counter >= gNumGuestsInPark / 16) + if (warningThrottle[1]) + --warningThrottle[1]; + else if (thirstCounter >= PEEP_THIRST_WARNING_THRESHOLD && thirstCounter >= gNumGuestsInPark / 16) { - warning_throttle[1] = 4; + warningThrottle[1] = 4; if (gConfigNotifications.guest_warnings) { constexpr auto thoughtId = static_cast(PeepThoughtType::Thirsty); @@ -1111,11 +1111,11 @@ void peep_problem_warnings_update() } } - if (warning_throttle[2]) - --warning_throttle[2]; - else if (toilet_counter >= PEEP_TOILET_WARNING_THRESHOLD && toilet_counter >= gNumGuestsInPark / 16) + if (warningThrottle[2]) + --warningThrottle[2]; + else if (toiletCounter >= PEEP_TOILET_WARNING_THRESHOLD && toiletCounter >= gNumGuestsInPark / 16) { - warning_throttle[2] = 4; + warningThrottle[2] = 4; if (gConfigNotifications.guest_warnings) { constexpr auto thoughtId = static_cast(PeepThoughtType::Toilet); @@ -1123,11 +1123,11 @@ void peep_problem_warnings_update() } } - if (warning_throttle[3]) - --warning_throttle[3]; - else if (litter_counter >= PEEP_LITTER_WARNING_THRESHOLD && litter_counter >= gNumGuestsInPark / 32) + if (warningThrottle[3]) + --warningThrottle[3]; + else if (litterCounter >= PEEP_LITTER_WARNING_THRESHOLD && litterCounter >= gNumGuestsInPark / 32) { - warning_throttle[3] = 4; + warningThrottle[3] = 4; if (gConfigNotifications.guest_warnings) { constexpr auto thoughtId = static_cast(PeepThoughtType::BadLitter); @@ -1135,11 +1135,11 @@ void peep_problem_warnings_update() } } - if (warning_throttle[4]) - --warning_throttle[4]; - else if (disgust_counter >= PEEP_DISGUST_WARNING_THRESHOLD && disgust_counter >= gNumGuestsInPark / 32) + if (warningThrottle[4]) + --warningThrottle[4]; + else if (disgustCounter >= PEEP_DISGUST_WARNING_THRESHOLD && disgustCounter >= gNumGuestsInPark / 32) { - warning_throttle[4] = 4; + warningThrottle[4] = 4; if (gConfigNotifications.guest_warnings) { constexpr auto thoughtId = static_cast(PeepThoughtType::PathDisgusting); @@ -1147,11 +1147,11 @@ void peep_problem_warnings_update() } } - if (warning_throttle[5]) - --warning_throttle[5]; - else if (vandalism_counter >= PEEP_VANDALISM_WARNING_THRESHOLD && vandalism_counter >= gNumGuestsInPark / 32) + if (warningThrottle[5]) + --warningThrottle[5]; + else if (vandalismCounter >= PEEP_VANDALISM_WARNING_THRESHOLD && vandalismCounter >= gNumGuestsInPark / 32) { - warning_throttle[5] = 4; + warningThrottle[5] = 4; if (gConfigNotifications.guest_warnings) { constexpr auto thoughtId = static_cast(PeepThoughtType::Vandalism); @@ -1159,20 +1159,20 @@ void peep_problem_warnings_update() } } - if (warning_throttle[6]) - --warning_throttle[6]; - else if (noexit_counter >= PEEP_NOEXIT_WARNING_THRESHOLD) + if (warningThrottle[6]) + --warningThrottle[6]; + else if (noexitCounter >= PEEP_NOEXIT_WARNING_THRESHOLD) { - warning_throttle[6] = 4; + warningThrottle[6] = 4; if (gConfigNotifications.guest_warnings) { constexpr auto thoughtId = static_cast(PeepThoughtType::CantFindExit); News::AddItemToQueue(News::ItemType::Peeps, STR_PEEPS_GETTING_LOST_OR_STUCK, thoughtId, {}); } } - else if (lost_counter >= PEEP_LOST_WARNING_THRESHOLD) + else if (lostCounter >= PEEP_LOST_WARNING_THRESHOLD) { - warning_throttle[6] = 4; + warningThrottle[6] = 4; if (gConfigNotifications.guest_warnings) { constexpr auto thoughtId = static_cast(PeepThoughtType::Lost); @@ -1180,12 +1180,12 @@ void peep_problem_warnings_update() } } - if (warning_throttle[7]) - --warning_throttle[7]; + if (warningThrottle[7]) + --warningThrottle[7]; else if (tooLongQueueCounter > PEEP_TOO_LONG_QUEUE_THRESHOLD && tooLongQueueCounter > inQueueCounter / 20) { // The amount of guests complaining about queue duration is at least 5% of the amount of queuing guests. // This includes guests who are no longer queuing. - warning_throttle[7] = 4; + warningThrottle[7] = 4; if (gConfigNotifications.guest_warnings) { auto rideWithMostQueueComplaints = std::max_element(