diff --git a/3rdParty/velocypack/include/velocypack/Slice.h b/3rdParty/velocypack/include/velocypack/Slice.h index f9c894b7da..e1b49ef8ee 100644 --- a/3rdParty/velocypack/include/velocypack/Slice.h +++ b/3rdParty/velocypack/include/velocypack/Slice.h @@ -732,7 +732,21 @@ class Slice { bool isEqualString(std::string const& attribute) const; // check if two Slices are equal on the binary level - bool equals(Slice const& other) const; + bool equals(Slice const& other) const { + if (head() != other.head()) { + return false; + } + + ValueLength const size = byteSize(); + + if (size != other.byteSize()) { + return false; + } + + return (memcmp(start(), other.start(), + arangodb::velocypack::checkOverflow(size)) == 0); + } + bool operator==(Slice const& other) const { return equals(other); } bool operator!=(Slice const& other) const { return !equals(other); } diff --git a/3rdParty/velocypack/src/Slice.cpp b/3rdParty/velocypack/src/Slice.cpp index 811c312873..39cbe2c720 100644 --- a/3rdParty/velocypack/src/Slice.cpp +++ b/3rdParty/velocypack/src/Slice.cpp @@ -390,22 +390,6 @@ Slice Slice::translateUnchecked() const { return Slice(); } -// check if two Slices are equal on the binary level -bool Slice::equals(Slice const& other) const { - if (head() != other.head()) { - return false; - } - - ValueLength const size = byteSize(); - - if (size != other.byteSize()) { - return false; - } - - return (memcmp(start(), other.start(), - arangodb::velocypack::checkOverflow(size)) == 0); -} - std::string Slice::toJson(Options const* options) const { std::string buffer; StringSink sink(&buffer);