![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
A simple dynamic array of integers. More...
#include <DetourAlloc.h>
Public Member Functions | |
| dtIntArray () | |
| Constructs an instance with an initial array size of zero. | |
| dtIntArray (int n) | |
| ~dtIntArray () | |
| void | resize (int n) |
| void | push (int item) |
| int | pop () |
| const int & | operator[] (int i) const |
| int & | operator[] (int i) |
| int | size () const |
| The current size of the integer array. | |
| int * | getData () const |
| void | copy (const dtIntArray &src) |
| bool | contains (int v) const |
A simple dynamic array of integers.
While it is possible to pre-allocate a specific array size during construction or by using the resize method, certain methods will automatically resize the array as needed.
|
inline |
Constructs an instance with an initial array size of zero.
|
inline |
Constructs an instance initialized to the specified size.
| [in] | n | The initial size of the integer array. |
|
inline |
|
inline |
| void dtIntArray::copy | ( | const dtIntArray & | src | ) |
|
inline |
|
inline |
The value at the specified array index.
| [in] | i | The index of the value. |
|
inline |
The value at the specified array index.
| [in] | i | The index of the value. |
|
inline |
Returns the value at the end of the array and reduces the size by one.
|
inline |
Push the specified integer onto the end of the array and increases the size by one.
| [in] | item | The new value. |
| void dtIntArray::resize | ( | int | n | ) |
Specifies the new size of the integer array.
| [in] | n | The new size of the integer array. |
Using this method ensures the array is at least large enough to hold the specified number of elements. This can improve performance by avoiding auto-resizing during use.
|
inline |
The current size of the integer array.