MCPcopy Create free account
hub / github.com/OpenApoc/OpenApoc / getFontStringCacheEntry

Method getFontStringCacheEntry

framework/data.cpp:851–866  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

849}
850
851sp<PaletteImage> DataImpl::getFontStringCacheEntry(const UString &font_name, const UString &string)
852{
853 std::lock_guard<std::recursive_mutex> l(this->fontStringCacheLock);
854 if (font_name == "")
855 {
856 LogError("invalid font_name");
857 return nullptr;
858 }
859 if (string == "")
860 {
861 // LogWarning("Empty string");
862 return nullptr;
863 }
864 auto img = this->fontStringCache[font_name][string].lock();
865 return img;
866}
867
868void DataImpl::putFontStringCacheEntry(const UString &font_name, const UString &string,
869 sp<PaletteImage> &img)

Callers 1

getStringMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected