MCPcopy Create free account
hub / github.com/audeering/opensmile / Clear

Function Clear

src/include/rapidjson/document.h:1533–1539  ·  view source on GitHub ↗

Remove all elements in the array. ! This function do not deallocate memory in the array, i.e. the capacity is unchanged. \note Linear time complexity. */

Source from the content-addressed store, hash-verified

1531 \note Linear time complexity.
1532 */
1533 void Clear() {
1534 RAPIDJSON_ASSERT(IsArray());
1535 GenericValue* e = GetElementsPointer();
1536 for (GenericValue* v = e; v != e + data_.a.size; ++v)
1537 v->~GenericValue();
1538 data_.a.size = 0;
1539 }
1540
1541 //! Get an element from array by index.
1542 /*! \pre IsArray() == true

Callers 1

~MemoryPoolAllocatorMethod · 0.70

Calls 2

IsArrayFunction · 0.85
GetElementsPointerFunction · 0.85

Tested by

no test coverage detected