diff options
author | peterbell10 <peterbell10@live.co.uk> | 2018-05-02 09:50:36 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-02 09:50:36 +0200 |
commit | a4dbb5c58270959884c17d720185da06464fa256 (patch) | |
tree | 2b4e81410e90e059f51726e6c9a01c03fcbfb98d /src/ClientHandle.cpp | |
parent | tolua++ bindings use nullptr. (#4219) (diff) | |
download | cuberite-a4dbb5c58270959884c17d720185da06464fa256.tar cuberite-a4dbb5c58270959884c17d720185da06464fa256.tar.gz cuberite-a4dbb5c58270959884c17d720185da06464fa256.tar.bz2 cuberite-a4dbb5c58270959884c17d720185da06464fa256.tar.lz cuberite-a4dbb5c58270959884c17d720185da06464fa256.tar.xz cuberite-a4dbb5c58270959884c17d720185da06464fa256.tar.zst cuberite-a4dbb5c58270959884c17d720185da06464fa256.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ClientHandle.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index 87ba9014e..a895dd3b3 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -782,7 +782,7 @@ void cClientHandle::HandleEnchantItem(UInt8 a_WindowID, UInt8 a_Enchantment) return; } - cEnchantingWindow * Window = reinterpret_cast<cEnchantingWindow *>(m_Player->GetWindow()); + cEnchantingWindow * Window = static_cast<cEnchantingWindow *>(m_Player->GetWindow()); cItem Item = *Window->m_SlotArea->GetSlot(0, *m_Player); // Make a copy of the item short BaseEnchantmentLevel = Window->GetPropertyValue(a_Enchantment); @@ -959,7 +959,7 @@ void cClientHandle::HandleBeaconSelection(int a_PrimaryEffect, int a_SecondaryEf { return; } - cBeaconWindow * BeaconWindow = reinterpret_cast<cBeaconWindow *>(Window); + cBeaconWindow * BeaconWindow = static_cast<cBeaconWindow *>(Window); if (Window->GetSlot(*m_Player, 0)->IsEmpty()) { @@ -1044,7 +1044,7 @@ void cClientHandle::HandleAnvilItemName(const AString & a_ItemName) if (a_ItemName.length() <= 30) { - reinterpret_cast<cAnvilWindow *>(m_Player->GetWindow())->SetRepairedItemName(a_ItemName, m_Player); + static_cast<cAnvilWindow *>(m_Player->GetWindow())->SetRepairedItemName(a_ItemName, m_Player); } } |