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. */
| 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 |
no test coverage detected