replace piForeach* to for(:)
another c++11 try ...
This commit is contained in:
@@ -69,7 +69,6 @@ public:
|
||||
}
|
||||
|
||||
inline PIVector<T> & operator =(PIVector<T> && other) {
|
||||
if (this == &other) return *this;
|
||||
swap(other);
|
||||
return *this;
|
||||
}
|
||||
@@ -301,6 +300,11 @@ public:
|
||||
piSwap<size_t>(piv_size, other.piv_size);
|
||||
piSwap<size_t>(piv_rsize, other.piv_rsize);
|
||||
}
|
||||
inline void swap(PIVector<T> && other) {
|
||||
piSwap<T*>(piv_data, other.piv_data);
|
||||
piSwap<size_t>(piv_size, other.piv_size);
|
||||
piSwap<size_t>(piv_rsize, other.piv_rsize);
|
||||
}
|
||||
|
||||
typedef int (*CompareFunc)(const T * , const T * );
|
||||
static int compare_func(const T * t0, const T * t1) {return (*t0) < (*t1) ? -1 : ((*t0) == (*t1) ? 0 : 1);}
|
||||
|
||||
Reference in New Issue
Block a user