OpenTTD Source 20250426-master-gbb1d561369
|
Functions related to memory operations. More...
#include "math_func.hpp"
Go to the source code of this file.
Functions | |
template<typename T > | |
void | MemCpyT (T *destination, const T *source, size_t num=1) |
Type-safe version of memcpy(). | |
template<typename T > | |
void | MemSetT (T *ptr, uint8_t value, size_t num=1) |
Type-safe version of memset(). | |
Functions related to memory operations.
Definition in file mem_func.hpp.
|
inline |
Type-safe version of memcpy().
destination | Pointer to the destination buffer |
source | Pointer to the source buffer |
num | number of items to be copied. (!not number of bytes!) |
Definition at line 23 of file mem_func.hpp.
Referenced by OutputBuffer::Add(), and Blitter_8bppOptimized::Draw().
|
inline |
Type-safe version of memset().
ptr | Pointer to the destination buffer |
value | Value to be set |
num | number of items to be set (!not number of bytes!) |
Definition at line 36 of file mem_func.hpp.
Referenced by Blitter_8bppOptimized::Draw(), DLSFile::LoadFile(), LoadWin32Font(), StringReader::ParseFile(), DLSFile::ReadDLSWave(), MusicSystem::SaveCustomPlaylist(), and MusicDriver_DMusic::Start().