mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-26 05:50:32 +05:00
Use correct range type in FlatArray
This commit is contained in:
parent
d215ac1025
commit
3f4cc7a07d
@ -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());
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user