NSMBW-Decomp
A decompilation of New Super Mario Bros. Wii
Loading...
Searching...
No Matches
class_arrays.cpp File Reference

Go to the source code of this file.

Functions

void * __construct_new_array (void *pBlock, ctorPtr pCtor, dtorPtr pDtor, u32 size, u32 n)
 Allocates and constructs an array of objects.
 
void __construct_array (void *pBlock, ctorPtr pCtor, dtorPtr pDtor, u32 size, u32 n)
 Constructs an array of objects.
 
void __destroy_arr (void *pBlock, dtorPtr pDtor, u32 size, u32 n)
 Destroys an array of objects.
 
void __destroy_new_array (void *pBlock, dtorPtr pDtor)
 Destroys and deletes an array of objects.
 

Function Documentation

◆ __construct_new_array()

void * __construct_new_array ( void * pBlock,
ctorPtr pCtor,
dtorPtr pDtor,
u32 size,
u32 n )

Allocates and constructs an array of objects.

The allocated memory must be size * n + 0x10.

[Calls to this function are generated as part of the new[] macro].

Parameters
pBlockA pointer to the allocated memory, or nullptr .
pCtorA pointer to the default constructor, or nullptr .
pDtorA pointer to the default destructor, or nullptr .
sizeThe size of one array element.
nThe number of array elements.
Returns
A pointer to the first array element.

Definition at line 19 of file class_arrays.cpp.

◆ __construct_array()

void __construct_array ( void * pBlock,
ctorPtr pCtor,
dtorPtr pDtor,
u32 size,
u32 n )

Constructs an array of objects.

[Calls to this function are generated by using constructor initializers on array members].

Parameters
pBlockA pointer to the array memory.
pCtorA pointer to the default constructor.
pDtorA pointer to the default destructor, or nullptr .
sizeThe size of one array element.
nThe number of array elements.

Definition at line 51 of file class_arrays.cpp.

◆ __destroy_arr()

void __destroy_arr ( void * pBlock,
dtorPtr pDtor,
u32 size,
u32 n )

Destroys an array of objects.

[Calls to this function are generated automatically by destructors of classes containing array members].

Parameters
pBlockA pointer to the array memory.
pDtorA pointer to the default destructor.
sizeThe size of one array element.
nThe number of array elements.

Definition at line 71 of file class_arrays.cpp.

◆ __destroy_new_array()

void __destroy_new_array ( void * pBlock,
dtorPtr pDtor )

Destroys and deletes an array of objects.

[Calls to this function are generated as part of the delete[] macro].

Parameters
pBlockA pointer to the allocated memory, or nullptr .
pDtorA pointer to the default destructor, or nullptr .

Definition at line 85 of file class_arrays.cpp.