OpenTTD Source
12.0-beta2
|
#include "math_func.hpp"
Go to the source code of this file.
Functions | |
template<typename T > | |
static void | MemCpyT (T *destination, const T *source, size_t num=1) |
Type-safe version of memcpy(). More... | |
template<typename T > | |
static void | MemMoveT (T *destination, const T *source, size_t num=1) |
Type-safe version of memmove(). More... | |
template<typename T > | |
static void | MemSetT (T *ptr, byte value, size_t num=1) |
Type-safe version of memset(). More... | |
template<typename T > | |
static int | MemCmpT (const T *ptr1, const T *ptr2, size_t num=1) |
Type-safe version of memcmp(). More... | |
template<typename T > | |
static void | MemReverseT (T *ptr1, T *ptr2) |
Type safe memory reverse operation. More... | |
template<typename T > | |
static void | MemReverseT (T *ptr, size_t num) |
Type safe memory reverse operation (overloaded) More... | |
Functions related to memory operations.
Definition in file mem_func.hpp.
|
inlinestatic |
Type-safe version of memcmp().
ptr1 | Pointer to the first buffer |
ptr2 | Pointer to the second buffer |
num | Number of items to compare. (!not number of bytes!) |
Definition at line 63 of file mem_func.hpp.
Referenced by GRFGetSizeOfDataSection(), and MidiFile::ReadSMFHeader().
|
inlinestatic |
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(), SmallMatrix< BaseEdge >::Assign(), NewGRFSpriteLayout::Clone(), CopyInDParam(), CopyOutDParam(), DoCreateNewIndustry(), DuplicateTileTable(), ResetObjects(), and HouseOverrideManager::SetEntitySpec().
|
inlinestatic |
Type-safe version of memmove().
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 36 of file mem_func.hpp.
|
inlinestatic |
Type safe memory reverse operation (overloaded)
ptr | Pointer to the block of memory. |
num | The number of items we want to reverse. |
Definition at line 94 of file mem_func.hpp.
|
inlinestatic |
Type safe memory reverse operation.
Reverse a block of memory in steps given by the type of the pointers.
ptr1 | Start-pointer to the block of memory. |
ptr2 | End-pointer to the block of memory. |
Definition at line 77 of file mem_func.hpp.
Referenced by GUIList< const Sign *, StringFilter & >::ToggleSortOrder().
|
inlinestatic |
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 49 of file mem_func.hpp.
Referenced by AfterLoadCompanyStats(), StringParameters::ClearTypeInformation(), CargoesRow::ConnectIndustryAccepted(), CargoesRow::ConnectIndustryProduced(), DoCreateNewIndustry(), CargoesField::MakeCargo(), CargoesRow::MakeCargoLabel(), CargoesField::MakeIndustry(), OpenGLSprite::OpenGLSprite(), DLSFile::ReadDLSWave(), ReadSpriteLayout(), VideoDriver_SDL_OpenGL::ReleaseVideoPointer(), and MusicSystem::SaveCustomPlaylist().