From 577db969fb1af0ba84b44b93a620da3257e8a4d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=91=D1=80=D0=B0=D0=BD=D0=B8=D0=BC=D0=B8=D1=80=20=D0=9A?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=9F=D0=B8=D1=9B?= Date: Mon, 20 Oct 2025 16:15:30 -0700 Subject: [PATCH] Removed unused code. --- src/bgfx.cpp | 48 ++++-------------------------------------------- 1 file changed, 4 insertions(+), 44 deletions(-) diff --git a/src/bgfx.cpp b/src/bgfx.cpp index 16f2936d5..4fb42572a 100644 --- a/src/bgfx.cpp +++ b/src/bgfx.cpp @@ -262,51 +262,11 @@ namespace bgfx Caps g_caps; -#if BGFX_CONFIG_MULTITHREADED && !defined(BX_THREAD_LOCAL) - class ThreadData - { - BX_CLASS(ThreadData - , NO_DEFAULT_CTOR - , NO_COPY - ); - - public: - ThreadData(uintptr_t _rhs) - { - union { uintptr_t ui; void* ptr; } cast = { _rhs }; - m_tls.set(cast.ptr); - } - - operator uintptr_t() const - { - union { uintptr_t ui; void* ptr; } cast; - cast.ptr = m_tls.get(); - return cast.ui; - } - - uintptr_t operator=(uintptr_t _rhs) - { - union { uintptr_t ui; void* ptr; } cast = { _rhs }; - m_tls.set(cast.ptr); - return _rhs; - } - - bool operator==(uintptr_t _rhs) const - { - uintptr_t lhs = *this; - return lhs == _rhs; - } - - private: - bx::TlsData m_tls; - }; - - static ThreadData s_threadIndex(0); -#elif !BGFX_CONFIG_MULTITHREADED - static uint32_t s_threadIndex(0); -#else +#if BGFX_CONFIG_MULTITHREADED static BX_THREAD_LOCAL uint32_t s_threadIndex(0); -#endif +#else + static uint32_t s_threadIndex(0); +#endif // BGFX_CONFIG_MULTITHREADED static Context* s_ctx = NULL; static bool s_renderFrameCalled = false;