From b46437ccded7d2a7058bbbd459fd7f7a52f1d54c Mon Sep 17 00:00:00 2001 From: Gymnasiast Date: Mon, 11 May 2020 19:22:25 +0200 Subject: [PATCH] Make common price functions take const --- src/openrct2/ride/ShopItem.cpp | 4 ++-- src/openrct2/ride/ShopItem.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/openrct2/ride/ShopItem.cpp b/src/openrct2/ride/ShopItem.cpp index a438ad22e3..44a005f250 100644 --- a/src/openrct2/ride/ShopItem.cpp +++ b/src/openrct2/ride/ShopItem.cpp @@ -76,7 +76,7 @@ const ShopItemDescriptor ShopItems[SHOP_ITEM_COUNT] = { }; // clang-format on -money32 shop_item_get_common_price(Ride* forRide, int32_t shopItem) +money32 shop_item_get_common_price(Ride* forRide, const int32_t shopItem) { for (const auto& ride : GetRideManager()) { @@ -105,7 +105,7 @@ money32 shop_item_get_common_price(Ride* forRide, int32_t shopItem) return MONEY32_UNDEFINED; } -bool shop_item_has_common_price(int32_t shopItem) +bool shop_item_has_common_price(const int32_t shopItem) { return (gSamePriceThroughoutPark & (1ULL << shopItem)) != 0; } diff --git a/src/openrct2/ride/ShopItem.h b/src/openrct2/ride/ShopItem.h index c9b352d291..c7efe57992 100644 --- a/src/openrct2/ride/ShopItem.h +++ b/src/openrct2/ride/ShopItem.h @@ -109,5 +109,5 @@ enum extern const ShopItemDescriptor ShopItems[SHOP_ITEM_COUNT]; extern uint64_t gSamePriceThroughoutPark; -money32 shop_item_get_common_price(Ride* forRide, int32_t shopItem); -bool shop_item_has_common_price(int32_t shopItem); +money32 shop_item_get_common_price(Ride* forRide, const int32_t shopItem); +bool shop_item_has_common_price(const int32_t shopItem);