mirror of
https://github.com/apple/foundationdb.git
synced 2025-05-14 09:58:50 +08:00
Revert to memcmp comparison in SkipList
This commit is contained in:
parent
5c325940ab
commit
011e181183
@ -379,16 +379,9 @@ private:
|
||||
};
|
||||
|
||||
static force_inline bool less( const uint8_t* a, int aLen, const uint8_t* b, int bLen ) {
|
||||
int len = min(aLen, bLen);
|
||||
for(int i=0; i<len; i++)
|
||||
if (a[i] < b[i])
|
||||
return true;
|
||||
else if (a[i] > b[i])
|
||||
return false;
|
||||
|
||||
/*int c = memcmp(a,b,min(aLen,bLen));
|
||||
int c = memcmp(a,b,min(aLen,bLen));
|
||||
if (c<0) return true;
|
||||
if (c>0) return false;*/
|
||||
if (c>0) return false;
|
||||
return aLen < bLen;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user