MCPcopy Create free account
hub / github.com/bytedance/sonic-cpp / Empty

Function Empty

include/sonic/dom/genericnode.h:566–569  ·  view source on GitHub ↗

* @brief Check string, array or object is empty. * @retval true is empty * @retval false is not empty * @note The type of this node must be string, array or object. */

Source from the content-addressed store, hash-verified

564 * @note The type of this node must be string, array or object.
565 */
566 bool Empty() const noexcept {
567 sonic_assert(this->IsContainer() || this->IsString());
568 return 0 == Size();
569 }
570
571 /**
572 * @brief make this array or object empty

Callers

nothing calls this directly

Calls 3

SizeFunction · 0.85
IsContainerMethod · 0.80
IsStringMethod · 0.80

Tested by

no test coverage detected