TrinityCore
|
#include <SmallArray.h>
Public Member Functions | |
SmallArray () | |
int | size () const |
void | resize (int n, bool shrinkIfNecessary=true) |
void | clear (bool shrinkIfNecessary=true) |
void | clearAndSetMemoryManager (MemoryManager::Ref &m) |
T & | operator[] (int i) |
const T & | operator[] (int i) const |
void | push (const T &v) |
void | append (const T &v) |
void | append (const T &v, const T &v2) |
void | append (const T &v, const T &v2, const T &v3) |
void | append (const T &v, const T &v2, const T &v3, const T &v4) |
int | findIndex (const T &v) |
void | fastRemove (int i, bool shrinkIfNecessary=false) |
T | pop () |
void | popDiscard () |
T & | next () |
bool | contains (const T &value) const |
template<int MIN_ELEMENTS> | |
SmallArray< T, N > & | operator= (const Array< T, MIN_ELEMENTS > &src) |
const T & | last () const |
T & | last () |
Private Attributes | |
int | m_size |
T | m_embedded [N] |
Array< T > | m_rest |
Embeds N elements to reduce allocation time and increase memory coherence when working with arrays of arrays. Offers a limited subset of the functionality of G3D::Array.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Find the index of v or -1 if not found
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
private |
First N elements
|
private |
Remaining elements
|
private |