src/core/smallvec_type.hpp
changeset 10416 b35c0a4c73c5
parent 9677 4767b9937c04
equal deleted inserted replaced
10415:fabf65e49e38 10416:b35c0a4c73c5
    43 		 * previously using. */
    43 		 * previously using. */
    44 		this->items = 0;
    44 		this->items = 0;
    45 	}
    45 	}
    46 
    46 
    47 	/**
    47 	/**
       
    48 	 * Remove all items from the list and free allocated memory.
       
    49 	 */
       
    50 	void Reset()
       
    51 	{
       
    52 		this->items = 0;
       
    53 		this->capacity = 0;
       
    54 		free(data);
       
    55 		data = NULL;
       
    56 	}
       
    57 
       
    58 	/**
    48 	 * Compact the list down to the smallest block size boundary.
    59 	 * Compact the list down to the smallest block size boundary.
    49 	 */
    60 	 */
    50 	FORCEINLINE void Compact()
    61 	FORCEINLINE void Compact()
    51 	{
    62 	{
    52 		uint capacity = Align(this->items, S);
    63 		uint capacity = Align(this->items, S);