mirror of
https://github.com/dashpay/dash.git
synced 2024-12-25 03:52:49 +01:00
Compare CDataStream internal vector with unsigned comparison
This commit is contained in:
parent
dd21d046f5
commit
53656b3e82
@ -553,7 +553,9 @@ protected:
|
||||
|
||||
struct DataStreamCmp {
|
||||
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 {
|
||||
return less(a, b);
|
||||
|
Loading…
Reference in New Issue
Block a user