MCPcopy Create free account
hub / github.com/axmolengine/axmol / FNTConfigLoadFile

Function FNTConfigLoadFile

core/2d/FontFNT.cpp:62–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

60static StringMap<BMFontConfiguration*>* s_configurations = nullptr;
61
62BMFontConfiguration* FNTConfigLoadFile(std::string_view fntFile)
63{
64 BMFontConfiguration* ret = nullptr;
65
66 if (s_configurations == nullptr)
67 {
68 s_configurations = new StringMap<BMFontConfiguration*>();
69 }
70
71 ret = s_configurations->at(fntFile);
72 if (ret == nullptr)
73 {
74 ret = BMFontConfiguration::create(fntFile);
75 if (ret)
76 {
77 s_configurations->insert(fntFile, ret);
78 }
79 }
80
81 return ret;
82}
83
84//
85// BitmapFontConfiguration

Callers 1

createMethod · 0.85

Calls 3

createFunction · 0.85
atMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected