add PIByteArray operator <, fix picloud
This commit is contained in:
@@ -198,6 +198,17 @@ inline bool operator <(const PIByteArray & v0, const PIByteArray & v1) {
|
||||
return v0.size() < v1.size();
|
||||
}
|
||||
|
||||
//! \relatesalso PIByteArray @brief Byte arrays compare operator
|
||||
inline bool operator >(const PIByteArray & v0, const PIByteArray & v1) {
|
||||
if (v0.size() == v1.size()) {
|
||||
for (uint i = 0; i < v0.size(); ++i)
|
||||
if (v0[i] != v1[i])
|
||||
return v0[i] > v1[i];
|
||||
return false;
|
||||
}
|
||||
return v0.size() > v1.size();
|
||||
}
|
||||
|
||||
//! \relatesalso PIByteArray @brief Byte arrays compare operator
|
||||
inline bool operator ==(PIByteArray & f, PIByteArray & s) {
|
||||
if (f.size_s() != s.size_s())
|
||||
|
||||
Reference in New Issue
Block a user