MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Clear

Function Clear

Source/ThirdParty/rapidjson/document.h:1655–1661  ·  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

1653 \note Linear time complexity.
1654 */
1655 void Clear() {
1656 RAPIDJSON_ASSERT(IsArray());
1657 GenericValue* e = GetElementsPointer();
1658 for (GenericValue* v = e; v != e + data_.a.size; ++v)
1659 v->~GenericValue();
1660 data_.a.size = 0;
1661 }
1662
1663 //! Get an element from array by index.
1664 /*! \pre IsArray() == true

Callers 2

~MemoryPoolAllocatorMethod · 0.70
~ImageCacheMethod · 0.50

Calls 2

GetElementsPointerFunction · 0.85
IsArrayFunction · 0.70

Tested by

no test coverage detected