mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 14:53:52 +00:00
22 lines
368 B
C++
22 lines
368 B
C++
#pragma once
|
|
|
|
#include <stdint.h>
|
|
|
|
namespace PortabilityLayer
|
|
{
|
|
class ArrayTools
|
|
{
|
|
public:
|
|
template<class T, class TSize, class TIndex>
|
|
static void RemoveFromArray(T *arr, TSize &count, TIndex index)
|
|
{
|
|
TSize countCopy = count;
|
|
countCopy--;
|
|
if (countCopy != index)
|
|
arr[index] = arr[countCopy];
|
|
|
|
count = static_cast<TSize>(countCopy);
|
|
}
|
|
};
|
|
}
|