1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

intptr-ization

This commit is contained in:
Brian Fiete 2021-11-14 18:02:26 -08:00
parent f9b4526934
commit 8d29a35947

View file

@ -9,7 +9,7 @@ class Span
{
public:
T* mVals;
int mSize;
intptr mSize;
public:
struct Iterator
@ -50,13 +50,13 @@ public:
}
Span(T* mPtr, int size)
Span(T* mPtr, intptr size)
{
mSize = (int)refVec.size();
mVals = NULL;
mVals = mPtr;
mSize = size;
}
T& operator[](int idx) const
T& operator[](intptr idx) const
{
return mVals[idx];
}
@ -76,7 +76,7 @@ public:
return mVals[mSize - 1];
}
int size() const
intptr size() const
{
return mSize;
}
@ -91,7 +91,7 @@ public:
return mSize == 0;
}
T Get(int idx)
T Get(intptr idx)
{
if ((idx < 0) || (idx >= mSize))
return (T)0;
@ -99,7 +99,7 @@ public:
}
template <typename T2>
T2 GetAs(int idx)
T2 GetAs(intptr idx)
{
if ((idx < 0) || (idx >= mSize))
return (T2)0;
@ -120,7 +120,7 @@ public:
return mVals[0];
}
void SetSize(int size)
void SetSize(intptr size)
{
BF_ASSERT(size <= mSize);
mSize = size;