From eacf5ccf30e25f1180873b82f829a3d3922dedb9 Mon Sep 17 00:00:00 2001 From: MatthewBeshay <92357869+MatthewBeshay@users.noreply.github.com> Date: Thu, 2 Apr 2026 16:30:19 +1100 Subject: [PATCH] refactor: remove backwards-compat enum aliases from PlatformTypes --- targets/minecraft/client/player/LocalPlayer.cpp | 2 +- targets/platform/PlatformTypes.h | 12 ------------ targets/platform/sdl2/Input.cpp | 2 +- targets/platform/sdl2/Profile.h | 2 +- 4 files changed, 3 insertions(+), 15 deletions(-) diff --git a/targets/minecraft/client/player/LocalPlayer.cpp b/targets/minecraft/client/player/LocalPlayer.cpp index 1461a1f31..5a4e30d87 100644 --- a/targets/minecraft/client/player/LocalPlayer.cpp +++ b/targets/minecraft/client/player/LocalPlayer.cpp @@ -850,7 +850,7 @@ void LocalPlayer::awardStat(Stat* stat, const std::vector& param) { if (g_NetworkManager.IsLocalGame() && g_NetworkManager.GetPlayerCount() == 1 && ProfileManager.GetAwardType(ach->getAchievementID()) != - eAwardType_Achievement) { + EAwardType::Achievement) { ui.CloseUIScenes(m_iPad); ui.NavigateToScene(m_iPad, eUIScene_PauseMenu); } diff --git a/targets/platform/PlatformTypes.h b/targets/platform/PlatformTypes.h index 3a21f0485..3ab7f3766 100644 --- a/targets/platform/PlatformTypes.h +++ b/targets/platform/PlatformTypes.h @@ -55,18 +55,6 @@ enum class EAwardType { AvatarItem, }; -// Backwards-compatible aliases for call sites still using the old -// unscoped names. Remove these as call sites are migrated. -inline constexpr auto EKeyboard_Pending = EKeyboardResult::Pending; -inline constexpr auto EKeyboard_Cancelled = EKeyboardResult::Cancelled; -inline constexpr auto EKeyboard_ResultAccept = EKeyboardResult::ResultAccept; -inline constexpr auto EKeyboard_ResultDecline = EKeyboardResult::ResultDecline; - -inline constexpr auto eAwardType_Achievement = EAwardType::Achievement; -inline constexpr auto eAwardType_GamerPic = EAwardType::GamerPic; -inline constexpr auto eAwardType_Theme = EAwardType::Theme; -inline constexpr auto eAwardType_AvatarItem = EAwardType::AvatarItem; - inline constexpr int XUSER_INDEX_ANY = 255; inline constexpr int XUSER_MAX_COUNT = 4; inline constexpr int XUSER_NAME_SIZE = 32; diff --git a/targets/platform/sdl2/Input.cpp b/targets/platform/sdl2/Input.cpp index 257fa3963..82f30d0bc 100644 --- a/targets/platform/sdl2/Input.cpp +++ b/targets/platform/sdl2/Input.cpp @@ -656,7 +656,7 @@ EKeyboardResult C_4JInput::RequestKeyboard(const wchar_t*, const wchar_t*, int, s_keyboardCallback = callback; s_keyboardCallbackParam = scene; SDL_StartTextInput(); - return EKeyboard_Pending; + return EKeyboardResult::Pending; } bool C_4JInput::GetMenuDisplayed(int iPad) { if (iPad >= 0 && iPad < 4) return s_menuDisplayed[iPad]; diff --git a/targets/platform/sdl2/Profile.h b/targets/platform/sdl2/Profile.h index 1fcdcd509..7caa83b26 100644 --- a/targets/platform/sdl2/Profile.h +++ b/targets/platform/sdl2/Profile.h @@ -112,7 +112,7 @@ public: CXuiStringTable* = nullptr, int = -1, int = -1, int = -1, char* = nullptr, unsigned int = 0L) {} int GetAwardId(int) { return 0; } - EAwardType GetAwardType(int) { return eAwardType_Achievement; } + EAwardType GetAwardType(int) { return EAwardType::Achievement; } bool CanBeAwarded(int, int) { return false; } void Award(int, int, bool = false) {} bool IsAwardsFlagSet(int, int) { return false; }