mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-18 18:02:37 +01:00
Codechange: Use std::unordered_map for storing TrueTypeFontCache's GlyphEntry.
This commit is contained in:
committed by
Peter Nelson
parent
7b717fcccb
commit
48539992e8
@@ -894,6 +894,12 @@ void *SimpleSpriteAllocator::AllocatePtr(size_t size)
|
||||
return MallocT<uint8_t>(size);
|
||||
}
|
||||
|
||||
void *UniquePtrSpriteAllocator::AllocatePtr(size_t size)
|
||||
{
|
||||
this->data = std::make_unique<uint8_t[]>(size);
|
||||
return this->data.get();
|
||||
}
|
||||
|
||||
/**
|
||||
* Handles the case when a sprite of different type is requested than is present in the SpriteCache.
|
||||
* For SpriteType::Font sprites, it is normal. In other cases, default sprite is loaded instead.
|
||||
|
||||
Reference in New Issue
Block a user