Merge pull request #2670 from Daniel-B-Smith/skip-memcmp

Revert to memcmp comparison in SkipList
This commit is contained in:
A.J. Beamon 2020-02-14 09:03:08 -08:00 committed by GitHub
commit a41aa41816
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 9 deletions

View File

@ -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;
}