Collections type aliasing fix

This one is debatable. It follows modern C++.
This commit is contained in:
Mateusz Karbowiak
2024-10-30 22:22:56 +01:00
parent a55866d558
commit f77f551b72
7 changed files with 11 additions and 11 deletions

View File

@@ -17,8 +17,8 @@ API_CLASS(InBuild) class Array
{
friend Array;
public:
typedef T ItemType;
typedef typename AllocationType::template Data<T> AllocationData;
using ItemType = T;
using AllocationData = typename AllocationType::template Data<T>;
private:
int32 _count;

View File

@@ -14,8 +14,8 @@ API_CLASS(InBuild) class BitArray
{
friend BitArray;
public:
typedef uint64 ItemType;
typedef typename AllocationType::template Data<ItemType> AllocationData;
using ItemType = uint64;
using AllocationData = typename AllocationType::template Data<ItemType>;
private:
int32 _count;

View File

@@ -102,7 +102,7 @@ public:
}
};
typedef typename AllocationType::template Data<Bucket> AllocationData;
using AllocationData = typename AllocationType::template Data<Bucket>;
private:
int32 _elementsCount = 0;

View File

@@ -85,7 +85,7 @@ public:
}
};
typedef typename AllocationType::template Data<Bucket> AllocationData;
using AllocationData = typename AllocationType::template Data<Bucket>;
private:
int32 _elementsCount = 0;

View File

@@ -14,8 +14,8 @@ template<typename T, typename AllocationType = HeapAllocation>
class RingBuffer
{
public:
typedef T ItemType;
typedef typename AllocationType::template Data<T> AllocationData;
using ItemType = T;
using AllocationData = typename AllocationType::template Data<T>;
private:
int32 _front = 0, _back = 0, _count = 0, _capacity = 0;

View File

@@ -279,4 +279,4 @@ public:
};
};
typedef HeapAllocation DefaultAllocation;
using DefaultAllocation = HeapAllocation;

View File

@@ -17,8 +17,8 @@ class RenderListBuffer
{
friend RenderListBuffer;
public:
typedef T ItemType;
typedef typename AllocationType::template Data<T> AllocationData;
using ItemType = T;
using AllocationData = typename AllocationType::template Data<T>;
private:
volatile int64 _count;