From a4cdde85c2adc6613006d25cd124e73b7a7a9e87 Mon Sep 17 00:00:00 2001 From: Shauren Date: Thu, 7 May 2026 16:43:22 +0200 Subject: [PATCH] Dep/g3d: Fix warnings with gcc 16 --- dep/g3dlite/G3D-v9.0 hotfix21.diff | 35 ++++++++++++++++++++++++++++++ dep/g3dlite/Readme.txt | 1 + dep/g3dlite/include/G3D/platform.h | 17 +-------------- 3 files changed, 37 insertions(+), 16 deletions(-) create mode 100644 dep/g3dlite/G3D-v9.0 hotfix21.diff diff --git a/dep/g3dlite/G3D-v9.0 hotfix21.diff b/dep/g3dlite/G3D-v9.0 hotfix21.diff new file mode 100644 index 0000000000..57e1e11cd2 --- /dev/null +++ b/dep/g3dlite/G3D-v9.0 hotfix21.diff @@ -0,0 +1,35 @@ +diff --git a/dep/g3dlite/include/G3D/platform.h b/dep/g3dlite/include/G3D/platform.h +index 400a81361e..a38e87a641 100644 +--- a/dep/g3dlite/include/G3D/platform.h ++++ b/dep/g3dlite/include/G3D/platform.h +@@ -366,29 +366,14 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw) {\ + + + // Bring in shared_ptr and weak_ptr +-#if (defined(__GNUC__) && defined(__APPLE__)) || defined(__linux__) +-#include // Defines _LIBCC_VERSION if linking against libc++ or does nothing +-#endif +-#if (!defined(_LIBCPP_VERSION) && defined(__APPLE__)) || (!defined(_LIBCPP_VERSION) && defined(__linux__)) +-# include +-#else +-# include +-#endif ++#include + + namespace G3D { +-#if (!defined(_LIBCPP_VERSION) && defined(__APPLE__)) || (!defined(_LIBCPP_VERSION) && defined(__linux__)) +- using std::tr1::shared_ptr; +- using std::tr1::weak_ptr; +- using std::tr1::dynamic_pointer_cast; +- using std::tr1::static_pointer_cast; +- using std::tr1::enable_shared_from_this; +-#else + using std::shared_ptr; + using std::weak_ptr; + using std::dynamic_pointer_cast; + using std::static_pointer_cast; + using std::enable_shared_from_this; +-#endif + + /** Options for initG3D and initGLG3D. */ + class G3DSpecification { diff --git a/dep/g3dlite/Readme.txt b/dep/g3dlite/Readme.txt index 0fa457de60..bceb46530c 100644 --- a/dep/g3dlite/Readme.txt +++ b/dep/g3dlite/Readme.txt @@ -30,3 +30,4 @@ G3D-v9.0 hotfix17.diff - 2023-03-25 - Fix macOS compile errors G3D-v9.0 hotfix18.diff - 2024-02-17 - ARM64 support on MSVC G3D-v9.0 hotfix19.diff - 2024-06-09 - clang build fix on windows G3D-v9.0 hotfix20.diff - 2026-05-07 - gcc build fix on windows +G3D-v9.0 hotfix21.diff - 2026-05-07 - gcc 16 warning fix diff --git a/dep/g3dlite/include/G3D/platform.h b/dep/g3dlite/include/G3D/platform.h index 400a81361e..a38e87a641 100644 --- a/dep/g3dlite/include/G3D/platform.h +++ b/dep/g3dlite/include/G3D/platform.h @@ -366,29 +366,14 @@ int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR szCmdLine, int sw) {\ // Bring in shared_ptr and weak_ptr -#if (defined(__GNUC__) && defined(__APPLE__)) || defined(__linux__) -#include // Defines _LIBCC_VERSION if linking against libc++ or does nothing -#endif -#if (!defined(_LIBCPP_VERSION) && defined(__APPLE__)) || (!defined(_LIBCPP_VERSION) && defined(__linux__)) -# include -#else -# include -#endif +#include namespace G3D { -#if (!defined(_LIBCPP_VERSION) && defined(__APPLE__)) || (!defined(_LIBCPP_VERSION) && defined(__linux__)) - using std::tr1::shared_ptr; - using std::tr1::weak_ptr; - using std::tr1::dynamic_pointer_cast; - using std::tr1::static_pointer_cast; - using std::tr1::enable_shared_from_this; -#else using std::shared_ptr; using std::weak_ptr; using std::dynamic_pointer_cast; using std::static_pointer_cast; using std::enable_shared_from_this; -#endif /** Options for initG3D and initGLG3D. */ class G3DSpecification {