PIByteArray compare operators
This commit is contained in:
@@ -190,10 +190,16 @@ public:
|
||||
return true;
|
||||
}
|
||||
inline bool operator !=(const PIDeque<T> & t) const {return !(*this == t);}
|
||||
inline bool operator <(const PIDeque<T> & t) const {
|
||||
if (pid_size != t.pid_size) return pid_size < t.pid_size;
|
||||
for (size_t i = 0; i < pid_size; ++i)
|
||||
if ((*this)[i] != t[i]) return (*this)[i] < t[i];
|
||||
return false;
|
||||
}
|
||||
inline bool operator >(const PIDeque<T> & t) const {
|
||||
if (pid_size != t.pid_size) return pid_size > t.pid_size;
|
||||
for (size_t i = 0; i < pid_size; ++i)
|
||||
if (t[i] != (*this)[i]) return t[i] > (*this)[i];
|
||||
if ((*this)[i] != t[i]) return (*this)[i] > t[i];
|
||||
return false;
|
||||
}
|
||||
inline bool contains(const T & v) const {
|
||||
|
||||
Reference in New Issue
Block a user