fceugx/source/fceultra/utils/valuearray.h
2009-07-17 17:27:04 +00:00

22 lines
423 B
C++

#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