Fix implicit compare

This commit is contained in:
Igor Canadi 2014-11-07 12:41:05 -08:00
parent a0f887c9e4
commit 31342c4005

View File

@ -123,7 +123,7 @@ inline bool operator!=(const Slice& x, const Slice& y) {
}
inline int Slice::compare(const Slice& b) const {
const int min_len = (size_ < b.size_) ? size_ : b.size_;
const size_t min_len = (size_ < b.size_) ? size_ : b.size_;
int r = memcmp(data_, b.data_, min_len);
if (r == 0) {
if (size_ < b.size_) r = -1;