From 3880df481ab32e3f6baf0006aa7dafdf0d892ac3 Mon Sep 17 00:00:00 2001 From: notmatthewbeshay <92357869+NotMachow@users.noreply.github.com> Date: Tue, 10 Mar 2026 00:05:16 +1100 Subject: [PATCH] Remove DWORD from utility TLS headers --- Minecraft.World/Util/AABB.cpp | 2 +- Minecraft.World/Util/AABB.h | 2 +- Minecraft.World/Util/IntCache.cpp | 4 ++-- Minecraft.World/Util/IntCache.h | 4 ++-- Minecraft.World/Util/Vec3.cpp | 4 ++-- Minecraft.World/Util/Vec3.h | 4 ++-- 6 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Minecraft.World/Util/AABB.cpp b/Minecraft.World/Util/AABB.cpp index b768f76f6..2999a43fd 100644 --- a/Minecraft.World/Util/AABB.cpp +++ b/Minecraft.World/Util/AABB.cpp @@ -7,7 +7,7 @@ #include "AABB.h" #include "HitResult.h" -DWORD AABB::tlsIdx = 0; +unsigned int AABB::tlsIdx = 0; AABB::ThreadStorage *AABB::tlsDefault = NULL; AABB::ThreadStorage::ThreadStorage() diff --git a/Minecraft.World/Util/AABB.h b/Minecraft.World/Util/AABB.h index 5341e6eba..28f55d1f8 100644 --- a/Minecraft.World/Util/AABB.h +++ b/Minecraft.World/Util/AABB.h @@ -18,7 +18,7 @@ class AABB ThreadStorage(); ~ThreadStorage(); }; - static DWORD tlsIdx; + static unsigned int tlsIdx; static ThreadStorage *tlsDefault; public: // Each new thread that needs to use Vec3 pools will need to call one of the following 2 functions, to either create its own diff --git a/Minecraft.World/Util/IntCache.cpp b/Minecraft.World/Util/IntCache.cpp index 39755e63f..241c541f9 100644 --- a/Minecraft.World/Util/IntCache.cpp +++ b/Minecraft.World/Util/IntCache.cpp @@ -1,7 +1,7 @@ #include "../Platform/stdafx.h" #include "IntCache.h" -DWORD IntCache::tlsIdx = TlsAlloc(); +unsigned int IntCache::tlsIdx = TlsAlloc(); void IntCache::CreateNewThreadStorage() { @@ -161,4 +161,4 @@ void IntCache::Reset() delete [] tls->toosmall[i].data; } tls->toosmall.clear(); -} \ No newline at end of file +} diff --git a/Minecraft.World/Util/IntCache.h b/Minecraft.World/Util/IntCache.h index 6097d6844..c83b1eba8 100644 --- a/Minecraft.World/Util/IntCache.h +++ b/Minecraft.World/Util/IntCache.h @@ -20,7 +20,7 @@ private: std::vector toosmall; // 4J added ~ThreadStorage(); }; - static DWORD tlsIdx; + static unsigned int tlsIdx; static const int TINY_CUTOFF = 256; @@ -31,4 +31,4 @@ public: static void CreateNewThreadStorage(); static void ReleaseThreadStorage(); static void Reset(); // 4J added -}; \ No newline at end of file +}; diff --git a/Minecraft.World/Util/Vec3.cpp b/Minecraft.World/Util/Vec3.cpp index 8c4671960..24132d839 100644 --- a/Minecraft.World/Util/Vec3.cpp +++ b/Minecraft.World/Util/Vec3.cpp @@ -2,7 +2,7 @@ #include "Vec3.h" #include "AABB.h" -DWORD Vec3::tlsIdx = 0; +unsigned int Vec3::tlsIdx = 0; Vec3::ThreadStorage *Vec3::tlsDefault = NULL; Vec3::ThreadStorage::ThreadStorage() @@ -262,4 +262,4 @@ double Vec3::distanceTo(AABB *box) else if( z > box->z1) zd = z - box->z1; return sqrt(xd * xd + yd * yd + zd * zd); -} \ No newline at end of file +} diff --git a/Minecraft.World/Util/Vec3.h b/Minecraft.World/Util/Vec3.h index 0d1fd247d..826bf9a0a 100644 --- a/Minecraft.World/Util/Vec3.h +++ b/Minecraft.World/Util/Vec3.h @@ -15,7 +15,7 @@ class Vec3 ThreadStorage(); ~ThreadStorage(); }; - static DWORD tlsIdx; + static unsigned int tlsIdx; static ThreadStorage *tlsDefault; public: // Each new thread that needs to use Vec3 pools will need to call one of the following 2 functions, to either create its own @@ -56,4 +56,4 @@ public: // 4J Added double distanceTo(AABB *box); -}; \ No newline at end of file +};