replace piForeach* to for(:)
another c++11 try ...
This commit is contained in:
@@ -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);}
|
||||
|
||||
Reference in New Issue
Block a user