diff --git a/3rdParty/velocypack/include/velocypack/Builder.h b/3rdParty/velocypack/include/velocypack/Builder.h index 21079fb1ac..a6fd2edbaa 100644 --- a/3rdParty/velocypack/include/velocypack/Builder.h +++ b/3rdParty/velocypack/include/velocypack/Builder.h @@ -799,7 +799,9 @@ struct ObjectBuilder final : public BuilderContainer, try { builder->close(); } catch (...) { - // destructors must not throw + // destructors must not throw. however, we can at least + // signal something is very wrong in debug mode + VELOCYPACK_ASSERT(false); } } }; @@ -826,7 +828,9 @@ struct ArrayBuilder final : public BuilderContainer, try { builder->close(); } catch (...) { - // destructors must not throw + // destructors must not throw. however, we can at least + // signal something is very wrong in debug mode + VELOCYPACK_ASSERT(false); } } }; diff --git a/3rdParty/velocypack/include/velocypack/Slice.h b/3rdParty/velocypack/include/velocypack/Slice.h index 0146bf9e32..43fb16a0b0 100644 --- a/3rdParty/velocypack/include/velocypack/Slice.h +++ b/3rdParty/velocypack/include/velocypack/Slice.h @@ -534,10 +534,14 @@ class Slice { } // tests whether the Slice is an empty array - constexpr bool isEmptyArray() const noexcept { return head() == 0x01; } + bool isEmptyArray() const { + return isArray() && length() == 0; + } // tests whether the Slice is an empty object - constexpr bool isEmptyObject() const noexcept { return head() == 0x0a; } + bool isEmptyObject() const { + return isObject() && length() == 0; + } // translates an integer key into a string Slice translate() const;