Use correct range type in FlatArray

This commit is contained in:
Matthias Hochsteger 2019-08-12 14:19:16 +02:00
parent d215ac1025
commit 3f4cc7a07d

View File

@ -404,6 +404,8 @@ namespace ngcore
/// the data /// the data
T * __restrict data; T * __restrict data;
public: public:
typedef T value_type;
typedef IndexType index_type;
using BaseArrayObject<FlatArray>::ILLEGAL_POSITION; using BaseArrayObject<FlatArray>::ILLEGAL_POSITION;
/// initialize array /// initialize array
@ -540,7 +542,7 @@ namespace ngcore
} }
/// takes range starting from position start of end-start elements /// takes range starting from position start of end-start elements
NETGEN_INLINE const FlatArray<T> operator[] (IntRange range) const NETGEN_INLINE const FlatArray<T> operator[] (T_Range<IndexType> range) const
{ {
return FlatArray<T> (range.Size(), data+range.First()); return FlatArray<T> (range.Size(), data+range.First());
} }