Remove DWORD from utility TLS headers

This commit is contained in:
notmatthewbeshay 2026-03-10 00:05:16 +11:00
parent e38e7c1fc0
commit 3880df481a
6 changed files with 10 additions and 10 deletions

View file

@ -7,7 +7,7 @@
#include "AABB.h" #include "AABB.h"
#include "HitResult.h" #include "HitResult.h"
DWORD AABB::tlsIdx = 0; unsigned int AABB::tlsIdx = 0;
AABB::ThreadStorage *AABB::tlsDefault = NULL; AABB::ThreadStorage *AABB::tlsDefault = NULL;
AABB::ThreadStorage::ThreadStorage() AABB::ThreadStorage::ThreadStorage()

View file

@ -18,7 +18,7 @@ class AABB
ThreadStorage(); ThreadStorage();
~ThreadStorage(); ~ThreadStorage();
}; };
static DWORD tlsIdx; static unsigned int tlsIdx;
static ThreadStorage *tlsDefault; static ThreadStorage *tlsDefault;
public: 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 // Each new thread that needs to use Vec3 pools will need to call one of the following 2 functions, to either create its own

View file

@ -1,7 +1,7 @@
#include "../Platform/stdafx.h" #include "../Platform/stdafx.h"
#include "IntCache.h" #include "IntCache.h"
DWORD IntCache::tlsIdx = TlsAlloc(); unsigned int IntCache::tlsIdx = TlsAlloc();
void IntCache::CreateNewThreadStorage() void IntCache::CreateNewThreadStorage()
{ {
@ -161,4 +161,4 @@ void IntCache::Reset()
delete [] tls->toosmall[i].data; delete [] tls->toosmall[i].data;
} }
tls->toosmall.clear(); tls->toosmall.clear();
} }

View file

@ -20,7 +20,7 @@ private:
std::vector<intArray> toosmall; // 4J added std::vector<intArray> toosmall; // 4J added
~ThreadStorage(); ~ThreadStorage();
}; };
static DWORD tlsIdx; static unsigned int tlsIdx;
static const int TINY_CUTOFF = 256; static const int TINY_CUTOFF = 256;
@ -31,4 +31,4 @@ public:
static void CreateNewThreadStorage(); static void CreateNewThreadStorage();
static void ReleaseThreadStorage(); static void ReleaseThreadStorage();
static void Reset(); // 4J added static void Reset(); // 4J added
}; };

View file

@ -2,7 +2,7 @@
#include "Vec3.h" #include "Vec3.h"
#include "AABB.h" #include "AABB.h"
DWORD Vec3::tlsIdx = 0; unsigned int Vec3::tlsIdx = 0;
Vec3::ThreadStorage *Vec3::tlsDefault = NULL; Vec3::ThreadStorage *Vec3::tlsDefault = NULL;
Vec3::ThreadStorage::ThreadStorage() Vec3::ThreadStorage::ThreadStorage()
@ -262,4 +262,4 @@ double Vec3::distanceTo(AABB *box)
else if( z > box->z1) zd = z - box->z1; else if( z > box->z1) zd = z - box->z1;
return sqrt(xd * xd + yd * yd + zd * zd); return sqrt(xd * xd + yd * yd + zd * zd);
} }

View file

@ -15,7 +15,7 @@ class Vec3
ThreadStorage(); ThreadStorage();
~ThreadStorage(); ~ThreadStorage();
}; };
static DWORD tlsIdx; static unsigned int tlsIdx;
static ThreadStorage *tlsDefault; static ThreadStorage *tlsDefault;
public: 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 // 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 // 4J Added
double distanceTo(AABB *box); double distanceTo(AABB *box);
}; };