mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-22 19:54:06 +01:00
Codechange: Use ProviderManager interface to register FontCache factories.
This removes use of #ifdefs to select the appropriate loader, and also replaces FontCache self-registration.
This commit is contained in:
committed by
Peter Nelson
parent
ed1262cab9
commit
140f2b291a
@@ -32,7 +32,8 @@ public:
|
||||
static void InitializeFontCaches()
|
||||
{
|
||||
for (FontSize fs = FS_BEGIN; fs != FS_END; fs++) {
|
||||
if (FontCache::caches[fs] == nullptr) new MockFontCache(fs); /* FontCache inserts itself into to the cache. */
|
||||
if (FontCache::Get(fs) != nullptr) continue;
|
||||
FontCache::caches[fs] = std::make_unique<MockFontCache>(fs);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user