replace piForeach* to for(:)

another c++11 try ...
This commit is contained in:
2020-07-30 20:08:33 +03:00
parent 2ffc457566
commit 557f2a4d0d
18 changed files with 151 additions and 235 deletions

View File

@@ -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);}