mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-11 10:37:25 +00:00
Remove DWORD from utility TLS headers
This commit is contained in:
parent
e38e7c1fc0
commit
3880df481a
|
|
@ -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()
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ private:
|
|||
std::vector<intArray> 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
|
||||
};
|
||||
};
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue