fceugx/source/fceultra/utils/valuearray.h

22 lines
423 B
C
Raw Normal View History

2009-07-17 19:27:04 +02:00
#ifndef _VALUEARRAY_H_
#define _VALUEARRAY_H_
template<typename T, int N>
struct ValueArray
{
T data[N];
T &operator[](int index) { return data[index]; }
static const int size = N;
bool operator!=(ValueArray<T,N> &other) { return !operator==(other); }
bool operator==(ValueArray<T,N> &other)
{
for(int i=0;i<size;i++)
if(data[i] != other[i])
return false;
return true;
}
};
#endif