mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-26 04:40:34 +05:00
cleanup
This commit is contained in:
parent
104c576caa
commit
fe21b0bb8b
@ -206,8 +206,8 @@ namespace netgen
|
|||||||
|
|
||||||
TIndex operator++ (int) { TIndex hi{*this}; i++; return hi; }
|
TIndex operator++ (int) { TIndex hi{*this}; i++; return hi; }
|
||||||
TIndex operator-- (int) { TIndex hi(*this); i--; return hi; }
|
TIndex operator-- (int) { TIndex hi(*this); i--; return hi; }
|
||||||
TIndex operator++ () { i++; return TIndex{*this}; }
|
TIndex & operator++ () { i++; return static_cast<TIndex&>(*this); }
|
||||||
TIndex operator-- () { i--; return TIndex{*this}; }
|
TIndex & operator-- () { i--; return static_cast<TIndex&>(*this); }
|
||||||
constexpr TIndex operator+= (T add) { i += add; return TIndex{*this}; }
|
constexpr TIndex operator+= (T add) { i += add; return TIndex{*this}; }
|
||||||
void Invalidate() { i = long(TIndex::BASE)-1; }
|
void Invalidate() { i = long(TIndex::BASE)-1; }
|
||||||
bool IsValid() const { return i+1 != TIndex::BASE; }
|
bool IsValid() const { return i+1 != TIndex::BASE; }
|
||||||
@ -218,9 +218,7 @@ namespace netgen
|
|||||||
|
|
||||||
|
|
||||||
template <typename T, typename TIndex, int Base>
|
template <typename T, typename TIndex, int Base>
|
||||||
// constexpr auto operator+ (Index<T,TIndex,Base> ind, int i) { return TIndex(T(ind)+i); }
|
constexpr auto operator+ (Index<T,TIndex,Base> ind, int i) { return TIndex(ind.i+i); }
|
||||||
// constexpr auto operator+ (Index<T,TIndex,Base> ind, int i) { return TIndex{ Index<T,TIndex,Base>(ind) +=i }; }
|
|
||||||
constexpr auto operator+ (Index<T,TIndex,Base> ind, int i) { return ind += i; return TIndex(ind); }
|
|
||||||
template <typename T, typename TIndex, int Base>
|
template <typename T, typename TIndex, int Base>
|
||||||
constexpr TIndex operator+ (Index<T,TIndex,Base> pi, size_t i) { return TIndex(pi.i+i); }
|
constexpr TIndex operator+ (Index<T,TIndex,Base> pi, size_t i) { return TIndex(pi.i+i); }
|
||||||
template <typename T, typename TIndex, int Base>
|
template <typename T, typename TIndex, int Base>
|
||||||
@ -250,7 +248,6 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using Index::Index;
|
using Index::Index;
|
||||||
constexpr PointIndex (Index<int,PointIndex,1> & ind) : Index<int,PointIndex,1>(ind) { }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -447,11 +444,6 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using Index<int,ElementIndex,0>::Index;
|
using Index<int,ElementIndex,0>::Index;
|
||||||
/*
|
|
||||||
constexpr ElementIndex () = default;
|
|
||||||
constexpr ElementIndex (int i) : Index<int,ElementIndex,0>(i) { }
|
|
||||||
constexpr ElementIndex (Index<int,ElementIndex,0> & ind) : Index<int,ElementIndex,0>(ind) { }
|
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
inline istream & operator>> (istream & ist, ElementIndex & pi)
|
inline istream & operator>> (istream & ist, ElementIndex & pi)
|
||||||
@ -477,7 +469,6 @@ namespace netgen
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
using Index::Index;
|
using Index::Index;
|
||||||
constexpr SurfaceElementIndex (Index<int,SurfaceElementIndex,0> & ind) : Index<int,SurfaceElementIndex,0>(ind) { }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user