mirror of https://gitee.com/bigwinds/arangodb
@maierlars 😍 (#9394)
This commit is contained in:
parent
081e755b25
commit
5221dc98b9
|
@ -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);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue