From 591dd48cf60acf6ad3dd3457e559791c3f501583 Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Mon, 16 Mar 2026 18:18:52 +1100 Subject: [PATCH 1/3] Upgrade the project default to C++26 --- .../Platform/Common/Audio/SoundEngine.h | 3 +- .../GameRules/ConsoleGameRulesConstants.h | 5 +-- .../Common/GameRules/GameRuleManager.cpp | 3 +- .../Linux/Stubs/DirectXMath/DirectXMath.h | 32 +++++++++---------- Minecraft.Client/UI/Screen.cpp | 2 +- Minecraft.World/IO/Files/File.cpp | 4 +-- Minecraft.World/Recipes/ArmorDyeRecipe.cpp | 4 +-- Minecraft.World/Recipes/ArmorDyeRecipe.h | 6 ++-- Minecraft.World/Recipes/Recipes.cpp | 2 +- Minecraft.World/Recipes/Recipy.h | 4 +-- Minecraft.World/Recipes/ShapedRecipy.cpp | 4 +-- Minecraft.World/Recipes/ShapedRecipy.h | 4 +-- Minecraft.World/Recipes/ShapelessRecipy.cpp | 4 +-- Minecraft.World/Recipes/ShapelessRecipy.h | 4 +-- Minecraft.World/Stats/Achievement.cpp | 14 ++++---- Minecraft.World/Stats/Achievement.h | 10 +++--- meson.build | 1 + 17 files changed, 55 insertions(+), 51 deletions(-) diff --git a/Minecraft.Client/Platform/Common/Audio/SoundEngine.h b/Minecraft.Client/Platform/Common/Audio/SoundEngine.h index e45572461..f75be95a3 100644 --- a/Minecraft.Client/Platform/Common/Audio/SoundEngine.h +++ b/Minecraft.Client/Platform/Common/Audio/SoundEngine.h @@ -153,7 +153,8 @@ private: C4JThread *m_openStreamThread; static int OpenStreamThreadProc( void* lpParameter ); char m_szStreamName[255]; - int CurrentSoundsPlaying[eSoundType_MAX+eSFX_MAX]; + int CurrentSoundsPlaying[static_cast(eSoundType_MAX) + + static_cast(eSFX_MAX)]; // streaming music files - will be different for mash-up packs int m_iStream_Overworld_Min,m_iStream_Overworld_Max; diff --git a/Minecraft.Client/Platform/Common/GameRules/ConsoleGameRulesConstants.h b/Minecraft.Client/Platform/Common/GameRules/ConsoleGameRulesConstants.h index a7111f042..93c012ac2 100644 --- a/Minecraft.Client/Platform/Common/GameRules/ConsoleGameRulesConstants.h +++ b/Minecraft.Client/Platform/Common/GameRules/ConsoleGameRulesConstants.h @@ -113,7 +113,8 @@ public: static void write(DataOutputStream *dos, ConsoleGameRules::EGameRuleAttr eAttr) { - dos->writeInt( eGameRuleType_Count + eAttr ); + dos->writeInt(static_cast(eGameRuleType_Count) + + static_cast(eAttr)); } -}; \ No newline at end of file +}; diff --git a/Minecraft.Client/Platform/Common/GameRules/GameRuleManager.cpp b/Minecraft.Client/Platform/Common/GameRules/GameRuleManager.cpp index bb64f0c1f..4f9134908 100644 --- a/Minecraft.Client/Platform/Common/GameRules/GameRuleManager.cpp +++ b/Minecraft.Client/Platform/Common/GameRules/GameRuleManager.cpp @@ -341,7 +341,8 @@ void GameRuleManager::writeRuleFile(DataOutputStream *dos) for (int i=0; i<8; i++) dos->writeBoolean(false); // Padding. // Write string lookup. - int numStrings = ConsoleGameRules::eGameRuleType_Count + ConsoleGameRules::eGameRuleAttr_Count; + int numStrings = static_cast(ConsoleGameRules::eGameRuleType_Count) + + static_cast(ConsoleGameRules::eGameRuleAttr_Count); dos->writeInt(numStrings); for (int i = 0; i < ConsoleGameRules::eGameRuleType_Count; i++) dos->writeUTF( wchTagNameA[i] ); for (int i = 0; i < ConsoleGameRules::eGameRuleAttr_Count; i++) dos->writeUTF( wchAttrNameA[i] ); diff --git a/Minecraft.Client/Platform/Linux/Stubs/DirectXMath/DirectXMath.h b/Minecraft.Client/Platform/Linux/Stubs/DirectXMath/DirectXMath.h index 0beb3a724..3ec021bd0 100644 --- a/Minecraft.Client/Platform/Linux/Stubs/DirectXMath/DirectXMath.h +++ b/Minecraft.Client/Platform/Linux/Stubs/DirectXMath/DirectXMath.h @@ -935,10 +935,10 @@ struct XMFLOAT3X3 { return m[Row][Column]; } -#if (__cplusplus >= 202002L) - bool operator==(const XMFLOAT3X3&) const = default; - auto operator<=>(const XMFLOAT3X3&) const = default; -#endif +#if (__cplusplus >= 202002L) + bool operator==(const XMFLOAT3X3&) const = delete; + auto operator<=>(const XMFLOAT3X3&) const = delete; +#endif }; //------------------------------------------------------------------------------ @@ -987,10 +987,10 @@ struct XMFLOAT4X3 { return m[Row][Column]; } -#if (__cplusplus >= 202002L) - bool operator==(const XMFLOAT4X3&) const = default; - auto operator<=>(const XMFLOAT4X3&) const = default; -#endif +#if (__cplusplus >= 202002L) + bool operator==(const XMFLOAT4X3&) const = delete; + auto operator<=>(const XMFLOAT4X3&) const = delete; +#endif }; // 4x3 Row-major Matrix: 32 bit floating point components aligned on a 16 byte @@ -1044,10 +1044,10 @@ struct XMFLOAT3X4 { return m[Row][Column]; } -#if (__cplusplus >= 202002L) - bool operator==(const XMFLOAT3X4&) const = default; - auto operator<=>(const XMFLOAT3X4&) const = default; -#endif +#if (__cplusplus >= 202002L) + bool operator==(const XMFLOAT3X4&) const = delete; + auto operator<=>(const XMFLOAT3X4&) const = delete; +#endif }; // 3x4 Column-major Matrix: 32 bit floating point components aligned on a 16 @@ -1106,10 +1106,10 @@ struct XMFLOAT4X4 { return m[Row][Column]; } -#if (__cplusplus >= 202002L) - bool operator==(const XMFLOAT4X4&) const = default; - auto operator<=>(const XMFLOAT4X4&) const = default; -#endif +#if (__cplusplus >= 202002L) + bool operator==(const XMFLOAT4X4&) const = delete; + auto operator<=>(const XMFLOAT4X4&) const = delete; +#endif }; // 4x4 Matrix: 32 bit floating point components aligned on a 16 byte boundary diff --git a/Minecraft.Client/UI/Screen.cpp b/Minecraft.Client/UI/Screen.cpp index 719e6c24c..1315feb9c 100644 --- a/Minecraft.Client/UI/Screen.cpp +++ b/Minecraft.Client/UI/Screen.cpp @@ -34,7 +34,7 @@ void Screen::keyPressed(wchar_t eventCharacter, int eventKey) { std::wstring Screen::getClipboard() { // 4J - removed - return NULL; + return std::wstring(); } void Screen::setClipboard(const std::wstring& str) { diff --git a/Minecraft.World/IO/Files/File.cpp b/Minecraft.World/IO/Files/File.cpp index 8f03fa15a..ac38e6f05 100644 --- a/Minecraft.World/IO/Files/File.cpp +++ b/Minecraft.World/IO/Files/File.cpp @@ -31,11 +31,11 @@ namespace fs = std::filesystem; fs::path ToFilesystemPath(const std::wstring& path) { const std::string nativePath = wstringtofilename(path); - return fs::u8path(nativePath); + return fs::path(nativePath); } std::wstring ToFilename(const fs::path& path) { - const std::string filename = path.filename().u8string(); + const std::string filename = path.filename().string(); return filenametowstring(filename.c_str()); } diff --git a/Minecraft.World/Recipes/ArmorDyeRecipe.cpp b/Minecraft.World/Recipes/ArmorDyeRecipe.cpp index 812e3faea..19dfdc61a 100644 --- a/Minecraft.World/Recipes/ArmorDyeRecipe.cpp +++ b/Minecraft.World/Recipes/ArmorDyeRecipe.cpp @@ -124,9 +124,9 @@ const ItemInstance* ArmorDyeRecipe::getResultItem() { return NULL; } const int ArmorDyeRecipe::getGroup() { return ShapedRecipy::eGroupType_Armour; } // 4J-PB -bool ArmorDyeRecipe::requires(int iRecipe) { return false; } +bool ArmorDyeRecipe::requiresRecipe(int iRecipe) { return false; } -void ArmorDyeRecipe::requires(INGREDIENTS_REQUIRED* pIngReq) { +void ArmorDyeRecipe::collectRequirements(INGREDIENTS_REQUIRED* pIngReq) { // int iCount=0; // bool bFound; // int j; diff --git a/Minecraft.World/Recipes/ArmorDyeRecipe.h b/Minecraft.World/Recipes/ArmorDyeRecipe.h index 52fbbb591..52a2c06a6 100644 --- a/Minecraft.World/Recipes/ArmorDyeRecipe.h +++ b/Minecraft.World/Recipes/ArmorDyeRecipe.h @@ -20,7 +20,7 @@ public: // 4J-PB virtual bool - requires(int iRecipe); + requiresRecipe(int iRecipe); virtual void - requires(INGREDIENTS_REQUIRED* pIngReq); -}; \ No newline at end of file + collectRequirements(INGREDIENTS_REQUIRED* pIngReq); +}; diff --git a/Minecraft.World/Recipes/Recipes.cpp b/Minecraft.World/Recipes/Recipes.cpp index 2c053dee3..c20ae2d95 100644 --- a/Minecraft.World/Recipes/Recipes.cpp +++ b/Minecraft.World/Recipes/Recipes.cpp @@ -1092,7 +1092,7 @@ void Recipes::buildRecipeIngredientsArray(void) { Recipy* recipe = *it; // wprintf(L"RECIPE - [%d] is // %w\n",iCount,recipe->getResultItem()->getItem()->getName()); - recipe->requires(&m_pRecipeIngredientsRequired[iCount++]); + recipe->collectRequirements(&m_pRecipeIngredientsRequired[iCount++]); } // printf("Total recipes in buildRecipeIngredientsArray - %d",iCount); diff --git a/Minecraft.World/Recipes/Recipy.h b/Minecraft.World/Recipes/Recipy.h index 15b169db6..d1570b216 100644 --- a/Minecraft.World/Recipes/Recipy.h +++ b/Minecraft.World/Recipes/Recipy.h @@ -52,9 +52,9 @@ public: // 4J-PB virtual bool - requires(int iRecipe) + requiresRecipe(int iRecipe) = 0; virtual void - requires(INGREDIENTS_REQUIRED* pIngReq) + collectRequirements(INGREDIENTS_REQUIRED* pIngReq) = 0; }; diff --git a/Minecraft.World/Recipes/ShapedRecipy.cpp b/Minecraft.World/Recipes/ShapedRecipy.cpp index b2a87aeec..8cb828c7b 100644 --- a/Minecraft.World/Recipes/ShapedRecipy.cpp +++ b/Minecraft.World/Recipes/ShapedRecipy.cpp @@ -92,7 +92,7 @@ std::shared_ptr ShapedRecipy::assemble( int ShapedRecipy::size() { return width * height; } // 4J-PB -bool ShapedRecipy::requires(int iRecipe) { +bool ShapedRecipy::requiresRecipe(int iRecipe) { app.DebugPrintf("ShapedRecipy %d\n", iRecipe); int iCount = 0; for (int x = 0; x < 3; x++) { @@ -109,7 +109,7 @@ bool ShapedRecipy::requires(int iRecipe) { return false; } -void ShapedRecipy::requires(INGREDIENTS_REQUIRED* pIngReq) { +void ShapedRecipy::collectRequirements(INGREDIENTS_REQUIRED* pIngReq) { // printf("ShapedRecipy %d\n",iRecipe); int iCount = 0; diff --git a/Minecraft.World/Recipes/ShapedRecipy.h b/Minecraft.World/Recipes/ShapedRecipy.h index 71a1351d2..47c175d8d 100644 --- a/Minecraft.World/Recipes/ShapedRecipy.h +++ b/Minecraft.World/Recipes/ShapedRecipy.h @@ -32,7 +32,7 @@ public: // 4J-PB - to return the items required to make a recipe virtual bool - requires(int iRecipe); + requiresRecipe(int iRecipe); virtual void - requires(INGREDIENTS_REQUIRED* pIngReq); + collectRequirements(INGREDIENTS_REQUIRED* pIngReq); }; diff --git a/Minecraft.World/Recipes/ShapelessRecipy.cpp b/Minecraft.World/Recipes/ShapelessRecipy.cpp index 0d8972346..68265a489 100644 --- a/Minecraft.World/Recipes/ShapelessRecipy.cpp +++ b/Minecraft.World/Recipes/ShapelessRecipy.cpp @@ -65,7 +65,7 @@ std::shared_ptr ShapelessRecipy::assemble( int ShapelessRecipy::size() { return (int)ingredients->size(); } // 4J-PB -bool ShapelessRecipy::requires(int iRecipe) { +bool ShapelessRecipy::requiresRecipe(int iRecipe) { std::vector* tempList = new std::vector; *tempList = *ingredients; @@ -87,7 +87,7 @@ bool ShapelessRecipy::requires(int iRecipe) { return false; } -void ShapelessRecipy::requires(INGREDIENTS_REQUIRED* pIngReq) { +void ShapelessRecipy::collectRequirements(INGREDIENTS_REQUIRED* pIngReq) { int iCount = 0; bool bFound; int j; diff --git a/Minecraft.World/Recipes/ShapelessRecipy.h b/Minecraft.World/Recipes/ShapelessRecipy.h index 910c63ad2..671f730c4 100644 --- a/Minecraft.World/Recipes/ShapelessRecipy.h +++ b/Minecraft.World/Recipes/ShapelessRecipy.h @@ -21,7 +21,7 @@ public: // 4J-PB - to return the items required to make a recipe virtual bool - requires(int iRecipe); + requiresRecipe(int iRecipe); virtual void - requires(INGREDIENTS_REQUIRED* pIngReq); + collectRequirements(INGREDIENTS_REQUIRED* pIngReq); }; diff --git a/Minecraft.World/Stats/Achievement.cpp b/Minecraft.World/Stats/Achievement.cpp index 3b4171191..ba8a9814e 100644 --- a/Minecraft.World/Stats/Achievement.cpp +++ b/Minecraft.World/Stats/Achievement.cpp @@ -40,10 +40,10 @@ void Achievement::_init() { * @param x X position in the achievement tree * @param y Y position in the achievement tree * @param icon Item used as the achievement icon - * @param requires Achievement object that is required to unlock this one + * @param prerequisite Achievement object that is required to unlock this one */ Achievement::Achievement(int id, const std::wstring& name, int x, int y, - Item* icon, Achievement* requires) + Item* icon, Achievement* prerequisite) : Stat(Achievements::ACHIEVEMENT_OFFSET + id, I18n::get(std::wstring(L"achievement.").append(name))), desc(I18n::get( @@ -51,10 +51,10 @@ Achievement::Achievement(int id, const std::wstring& name, int x, int y, icon(new ItemInstance(icon)), x(x), y(y), - requires(requires) {} + prerequisite(prerequisite) {} Achievement::Achievement(int id, const std::wstring& name, int x, int y, - Tile* icon, Achievement* requires) + Tile* icon, Achievement* prerequisite) : Stat(Achievements::ACHIEVEMENT_OFFSET + id, I18n::get(std::wstring(L"achievement.").append(name))), desc(I18n::get( @@ -62,11 +62,11 @@ Achievement::Achievement(int id, const std::wstring& name, int x, int y, icon(new ItemInstance(icon)), x(x), y(y), - requires(requires) {} + prerequisite(prerequisite) {} Achievement::Achievement(int id, const std::wstring& name, int x, int y, std::shared_ptr icon, - Achievement* requires) + Achievement* prerequisite) : Stat(Achievements::ACHIEVEMENT_OFFSET + id, I18n::get(std::wstring(L"achievement.").append(name))), desc(I18n::get( @@ -74,7 +74,7 @@ Achievement::Achievement(int id, const std::wstring& name, int x, int y, icon(icon), x(x), y(y), - requires(requires) {} + prerequisite(prerequisite) {} /** * @brief Sets the decription formatter (DescFormatter) diff --git a/Minecraft.World/Stats/Achievement.h b/Minecraft.World/Stats/Achievement.h index 444be24d4..a0708cde4 100644 --- a/Minecraft.World/Stats/Achievement.h +++ b/Minecraft.World/Stats/Achievement.h @@ -7,8 +7,7 @@ class DescFormatter; class Achievement : public Stat { public: const int x, y; - Achievement* - requires; + Achievement* prerequisite; private: const std::wstring desc; @@ -23,11 +22,12 @@ private: public: Achievement(int id, const std::wstring& name, int x, int y, Item* icon, - Achievement* requires); + Achievement* prerequisite); Achievement(int id, const std::wstring& name, int x, int y, Tile* icon, - Achievement* requires); + Achievement* prerequisite); Achievement(int id, const std::wstring& name, int x, int y, - std::shared_ptr icon, Achievement* requires); + std::shared_ptr icon, + Achievement* prerequisite); Achievement* setAwardLocallyOnly(); Achievement* setGolden(); diff --git a/meson.build b/meson.build index 0ad3c83a9..7295092e7 100644 --- a/meson.build +++ b/meson.build @@ -2,6 +2,7 @@ project('4jcraft-chucklegrounds', ['cpp', 'c'], version : '0.1.0', meson_version: '>= 1.1', default_options : [ + 'cpp_std=c++26', 'warning_level=0', 'buildtype=debug', # for now 'unity=on', # merge source files per target From a560826bad9c60206c3e960f60a880ca9bf25450 Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Mon, 16 Mar 2026 22:17:17 +1100 Subject: [PATCH 2/3] Fix the remaining C++26 build warnings --- Minecraft.Client/Minecraft.cpp | 2 ++ Minecraft.Client/Platform/Common/Consoles_App.cpp | 14 +++++++++++++- .../Platform/Common/UI/UIController.cpp | 6 ++++++ .../Platform/Common/UI/UIScene_CreativeMenu.cpp | 4 +++- .../Common/UI/UIScene_DebugCreateSchematic.cpp | 2 ++ .../Common/UI/UIScene_LeaderboardsMenu.cpp | 4 ++++ Minecraft.Client/Player/ServerPlayer.cpp | 4 ++++ 7 files changed, 34 insertions(+), 2 deletions(-) diff --git a/Minecraft.Client/Minecraft.cpp b/Minecraft.Client/Minecraft.cpp index 5cb79f834..05196f17e 100644 --- a/Minecraft.Client/Minecraft.cpp +++ b/Minecraft.Client/Minecraft.cpp @@ -1981,6 +1981,8 @@ void Minecraft::run_middle() { // capture the save thumbnail app.CaptureSaveThumbnail(); break; + default: + break; } } } diff --git a/Minecraft.Client/Platform/Common/Consoles_App.cpp b/Minecraft.Client/Platform/Common/Consoles_App.cpp index dc6d4e281..4bcf758e5 100644 --- a/Minecraft.Client/Platform/Common/Consoles_App.cpp +++ b/Minecraft.Client/Platform/Common/Consoles_App.cpp @@ -1330,6 +1330,8 @@ void CMinecraftApp::ActionGameSettings(int iPad,eGameSetting eVal) case eGameSetting_PSVita_NetworkModeAdhoc: //nothing to do here break; + default: + break; } } @@ -3810,6 +3812,8 @@ void CMinecraftApp::HandleXuiActions(void) SetAction(i,eAppAction_Idle); } + break; + default: break; } } @@ -3994,6 +3998,8 @@ void CMinecraftApp::HandleXuiActions(void) // app.NavigateToScene(ProfileManager.GetPrimaryPad(),eUIScene_MultiGameJoinLoad); // } break; + default: + break; } } @@ -7512,6 +7518,8 @@ void CMinecraftApp::SetGameHostOption(unsigned int &uiHostSettings, eGameHostOpt case eGameHostOption_All: uiHostSettings=uiVal; break; + default: + break; } } @@ -7585,7 +7593,9 @@ unsigned int CMinecraftApp::GetGameHostOption(unsigned int uiHostSettings, eGame break; case eGameHostOption_DisableSaving: return (uiHostSettings&GAME_HOST_OPTION_BITMASK_DISABLESAVE); - break; + break; + default: + return 0; } return false; @@ -7918,6 +7928,8 @@ std::wstring CMinecraftApp::getEntityName(eINSTANCEOF type) // 4J-PB - fix for #107167 - Customer Encountered: TU12: Content: UI: There is no information what killed Player after being slain by Iron Golem. case eTYPE_VILLAGERGOLEM: return app.GetString(IDS_IRONGOLEM); + default: + break; }; diff --git a/Minecraft.Client/Platform/Common/UI/UIController.cpp b/Minecraft.Client/Platform/Common/UI/UIController.cpp index 7fc5563ca..36a0616ed 100644 --- a/Minecraft.Client/Platform/Common/UI/UIController.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIController.cpp @@ -1171,6 +1171,8 @@ void UIController::setupRenderPosition(C4JRender::eViewportType viewport) xPos = (S32)(getScreenWidth() / 2); yPos = (S32)(getScreenHeight() / 2); break; + default: + break; } m_tileOriginX = xPos; m_tileOriginY = yPos; @@ -1433,6 +1435,8 @@ bool UIController::NavigateToScene(int iPad, EUIScene scene, void *initData, EUI app.DebugPrintf("IGNORING NAVIGATE - we're trying to navigate to a user selected scene when there's already a scene up: pad:%d, scene:%d\n", iPad, scene); return false; break; + default: + break; } } @@ -1458,6 +1462,8 @@ bool UIController::NavigateToScene(int iPad, EUIScene scene, void *initData, EUI layer = eUILayer_Scene; } break; + default: + break; }; int menuDisplayedPad = XUSER_INDEX_ANY; if(group == eUIGroup_PAD) diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_CreativeMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_CreativeMenu.cpp index 36a08488d..7b47dd851 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_CreativeMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_CreativeMenu.cpp @@ -155,6 +155,8 @@ void UIScene_CreativeMenu::handleOtherClicked(int iPad, ESceneSection eSection, case eSectionInventoryCreativeSlider: ScrollBar(this->m_pointerPos); break; + default: + break; } } @@ -490,4 +492,4 @@ void UIScene_CreativeMenu::updateScrollCurrentPage(int currentPage, int pageCoun value[1].number = (F64)currentPage - 1; IggyResult out = IggyPlayerCallMethodRS ( getMovie() , &result, IggyPlayerRootPath( getMovie() ) , m_funcSetScrollBar , 2 , value ); -} \ No newline at end of file +} diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_DebugCreateSchematic.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_DebugCreateSchematic.cpp index 67436505f..671b247b5 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_DebugCreateSchematic.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_DebugCreateSchematic.cpp @@ -208,6 +208,8 @@ int UIScene_DebugCreateSchematic::KeyboardCompleteCallback(void *lpParam,bool bR pClass->m_data->endZ = iVal; } break; + default: + break; } } diff --git a/Minecraft.Client/Platform/Common/UI/UIScene_LeaderboardsMenu.cpp b/Minecraft.Client/Platform/Common/UI/UIScene_LeaderboardsMenu.cpp index ea0d3f63c..3fd18c9eb 100644 --- a/Minecraft.Client/Platform/Common/UI/UIScene_LeaderboardsMenu.cpp +++ b/Minecraft.Client/Platform/Common/UI/UIScene_LeaderboardsMenu.cpp @@ -350,6 +350,8 @@ void UIScene_LeaderboardsMenu::handleInput(int iPad, int key, bool repeat, bool m_labelFilter.setLabel(filterBuffer); } break; + default: + break; } ReadStats(-1); @@ -484,6 +486,8 @@ void UIScene_LeaderboardsMenu::ReadStats(int startIndex) ); } break; + default: + break; } //Show the loading message diff --git a/Minecraft.Client/Player/ServerPlayer.cpp b/Minecraft.Client/Player/ServerPlayer.cpp index 9de4edcfc..b3ea69cac 100644 --- a/Minecraft.Client/Player/ServerPlayer.cpp +++ b/Minecraft.Client/Player/ServerPlayer.cpp @@ -703,6 +703,8 @@ bool ServerPlayer::hurt(DamageSource* dmgSource, int dmg) { m_lastDamageSource = eTelemetryPlayerDeathSource_Player_Arrow; break; + default: + break; } } } @@ -710,6 +712,8 @@ bool ServerPlayer::hurt(DamageSource* dmgSource, int dmg) { case eTYPE_FIREBALL: m_lastDamageSource = eTelemetryPlayerDeathSource_Ghast; break; + default: + break; }; } }; From 380471d0bf52d40b74abada186eff064ed746254 Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Mon, 16 Mar 2026 22:26:27 +1100 Subject: [PATCH 3/3] Stop Linux SAL macros from breaking C++26 CI --- .../Platform/Linux/Stubs/d3d11_stubs.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/Minecraft.Client/Platform/Linux/Stubs/d3d11_stubs.h b/Minecraft.Client/Platform/Linux/Stubs/d3d11_stubs.h index 7d6175c6c..4e922fcc9 100644 --- a/Minecraft.Client/Platform/Linux/Stubs/d3d11_stubs.h +++ b/Minecraft.Client/Platform/Linux/Stubs/d3d11_stubs.h @@ -6,6 +6,19 @@ #include "winapi_stubs.h" #include "DirectXMath/DirectXMath.h" +// The DirectXMath SAL shim defines a few reserved identifiers such as +// `__valid`. Newer libstdc++ headers also use those internal names, so keep +// the shim's macros from leaking past the DirectXMath include. +#ifdef __valid +#undef __valid +#endif +#ifdef __notvalid +#undef __notvalid +#endif +#ifdef __maybevalid +#undef __maybevalid +#endif + using namespace DirectX; typedef struct _RECT { @@ -64,4 +77,4 @@ enum D3D11_COMPARISON_FUNC { D3D11_COMPARISON_ALWAYS = 8 }; -#endif // D3D11STUBS_H \ No newline at end of file +#endif // D3D11STUBS_H