FontCache: Default destructor within the cpp file

Avoids potentially inlining a lot of repeated destruction logic. This
also allows the class to play nicer with forward declarations.

While we're at it, we can also explicitly delete the move
assignment/constructor (previously they were implicitly deleted, given
the class contains a const reference).
This commit is contained in:
Lioncash 2019-09-05 19:03:58 -04:00
parent 8ff9e028c7
commit b25cfdd305
2 changed files with 4 additions and 0 deletions

View File

@ -176,6 +176,8 @@ class FontCache {
public:
FontCache(const hecl::Runtime::FileStoreManager& fileMgr);
~FontCache();
FontCache(const FontCache& other) = delete;
FontCache& operator=(const FontCache& other) = delete;

View File

@ -613,6 +613,8 @@ FontCache::FontCache(const hecl::Runtime::FileStoreManager& fileMgr)
hecl::MakeDir(m_cacheRoot.c_str());
}
FontCache::~FontCache() = default;
FontTag FontCache::prepCustomFont(std::string_view name, FT_Face face, FCharFilter filter, bool subpixel, float points,
uint32_t dpi) {
/* Quick validation */