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

@@ -70,7 +70,6 @@ public:
}
inline PIDeque<T> & operator =(PIDeque<T> && other) {
if (this == &other) return *this;
swap(other);
return *this;
}
@@ -324,6 +323,12 @@ public:
piSwap<size_t>(pid_rsize, other.pid_rsize);
piSwap<ssize_t>(pid_start, other.pid_start);
}
inline void swap(PIDeque<T> && other) {
piSwap<T*>(pid_data, other.pid_data);
piSwap<size_t>(pid_size, other.pid_size);
piSwap<size_t>(pid_rsize, other.pid_rsize);
piSwap<ssize_t>(pid_start, other.pid_start);
}
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);}