MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / Clear

Function Clear

Engine/source/persistence/rapidjson/document.h:1575–1581  ·  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

1573 \note Linear time complexity.
1574 */
1575 void Clear() {
1576 RAPIDJSON_ASSERT(IsArray());
1577 GenericValue* e = GetElementsPointer();
1578 for (GenericValue* v = e; v != e + data_.a.size; ++v)
1579 v->~GenericValue();
1580 data_.a.size = 0;
1581 }
1582
1583 //! Get an element from array by index.
1584 /*! \pre IsArray() == true

Callers 2

~MemoryPoolAllocatorMethod · 0.70
LoadFileMethod · 0.50

Calls 2

IsArrayFunction · 0.70
GetElementsPointerFunction · 0.70

Tested by

no test coverage detected