OpenTTD Source 20250727-master-g79524af5fc
|
SpriteAllocator that allocates memory via a unique_ptr array. More...
#include <spritecache.h>
Data Fields | |
std::unique_ptr< std::byte[]> | data |
size_t | size |
Protected Member Functions | |
void * | AllocatePtr (size_t size) override |
Allocate memory for a sprite. | |
Additional Inherited Members | |
![]() | |
template<typename T > | |
T * | Allocate (size_t size) |
Allocate memory for a sprite. | |
SpriteAllocator that allocates memory via a unique_ptr array.
Definition at line 20 of file spritecache.h.
|
overrideprotectedvirtual |
Allocate memory for a sprite.
size | Size of memory to allocate. |
Implements SpriteAllocator.
Definition at line 791 of file spritecache.cpp.
std::unique_ptr<std::byte[]> UniquePtrSpriteAllocator::data |
Definition at line 22 of file spritecache.h.
size_t UniquePtrSpriteAllocator::size |
Definition at line 23 of file spritecache.h.