Add FacadeFuzz
This commit is contained in:
18
KeyCompare.h
Normal file
18
KeyCompare.h
Normal file
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
|
||||
#include "VersionedMap.h"
|
||||
|
||||
#include <algorithm>
|
||||
#include <string.h>
|
||||
|
||||
inline auto operator<=>(const weaselab::VersionedMap::Key &lhs,
|
||||
const weaselab::VersionedMap::Key &rhs) {
|
||||
int cl = std::min(lhs.len, rhs.len);
|
||||
if (cl > 0) {
|
||||
int c = memcmp(lhs.p, rhs.p, cl);
|
||||
if (c != 0) {
|
||||
return c <=> 0;
|
||||
}
|
||||
}
|
||||
return lhs.len <=> rhs.len;
|
||||
}
|
Reference in New Issue
Block a user