Compare CDataStream internal vector with unsigned comparison
This commit is contained in:
parent
dd21d046f5
commit
53656b3e82
@ -553,7 +553,9 @@ protected:
|
|||||||
|
|
||||||
struct DataStreamCmp {
|
struct DataStreamCmp {
|
||||||
static bool less(const CDataStream& a, const CDataStream& b) {
|
static bool less(const CDataStream& a, const CDataStream& b) {
|
||||||
return std::lexicographical_compare(a.begin(), a.end(), b.begin(), b.end());
|
return std::lexicographical_compare(
|
||||||
|
(const uint8_t*)a.data(), (const uint8_t*)a.data() + a.size(),
|
||||||
|
(const uint8_t*)b.data(), (const uint8_t*)b.data() + b.size());
|
||||||
}
|
}
|
||||||
bool operator()(const CDataStream& a, const CDataStream& b) const {
|
bool operator()(const CDataStream& a, const CDataStream& b) const {
|
||||||
return less(a, b);
|
return less(a, b);
|
||||||
|
Loading…
Reference in New Issue
Block a user