From 28614b922fb77149a54da1a87bebfbc98736f296 Mon Sep 17 00:00:00 2001 From: ModMaker101 <119018978+ModMaker101@users.noreply.github.com> Date: Sun, 8 Mar 2026 19:08:36 -0400 Subject: Modernize project codebase (#906) * Fixed boats falling and a TP glitch #266 * Replaced every C-style cast with C++ ones * Replaced every C-style cast with C++ ones * Fixed boats falling and a TP glitch #266 * Updated NULL to nullptr and fixing some type issues * Modernized and fixed a few bugs - Replaced most instances of `NULL` with `nullptr`. - Replaced most `shared_ptr(new ...)` with `make_shared`. - Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances. * Fixing more conflicts * Replace int loops with size_t and start work on overrides * Add safety checks and fix a issue with vector going OOR --- Minecraft.Client/Common/UI/UIControl_MinecraftHorse.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Minecraft.Client/Common/UI/UIControl_MinecraftHorse.cpp') diff --git a/Minecraft.Client/Common/UI/UIControl_MinecraftHorse.cpp b/Minecraft.Client/Common/UI/UIControl_MinecraftHorse.cpp index 457e2028..25fc0316 100644 --- a/Minecraft.Client/Common/UI/UIControl_MinecraftHorse.cpp +++ b/Minecraft.Client/Common/UI/UIControl_MinecraftHorse.cpp @@ -27,10 +27,10 @@ UIControl_MinecraftHorse::UIControl_MinecraftHorse() Minecraft *pMinecraft=Minecraft::GetInstance(); ScreenSizeCalculator ssc(pMinecraft->options, pMinecraft->width_phys, pMinecraft->height_phys); - m_fScreenWidth=(float)pMinecraft->width_phys; - m_fRawWidth=(float)ssc.rawWidth; - m_fScreenHeight=(float)pMinecraft->height_phys; - m_fRawHeight=(float)ssc.rawHeight; + m_fScreenWidth=static_cast(pMinecraft->width_phys); + m_fRawWidth=static_cast(ssc.rawWidth); + m_fScreenHeight=static_cast(pMinecraft->height_phys); + m_fRawHeight=static_cast(ssc.rawHeight); } void UIControl_MinecraftHorse::render(IggyCustomDrawCallbackRegion *region) @@ -49,7 +49,7 @@ void UIControl_MinecraftHorse::render(IggyCustomDrawCallbackRegion *region) glTranslatef(xo, yo - (height / 7.5f), 50.0f); //UIScene_InventoryMenu *containerMenu = (UIScene_InventoryMenu *)m_parentScene; - UIScene_HorseInventoryMenu *containerMenu = (UIScene_HorseInventoryMenu *)m_parentScene; + UIScene_HorseInventoryMenu *containerMenu = static_cast(m_parentScene); shared_ptr entityHorse = containerMenu->m_horse; -- cgit v1.2.3