MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / _is_cyclic

Method _is_cyclic

modules/gui/gui/src/backend/text_server/font.cpp:81–101  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79}
80
81bool Font::_is_cyclic(const Ref<Font>& p_f, int p_depth) const
82{
83 ERR_FAIL_COND_V(p_depth > MAX_FALLBACK_DEPTH, true);
84 if (p_f.is_null())
85 {
86 return false;
87 }
88 if (p_f.get() == this)
89 {
90 return true;
91 }
92 for (int i = 0; i < p_f->fallbacks.size(); i++)
93 {
94 const Ref<Font>& f = p_f->fallbacks[i];
95 if (_is_cyclic(f, p_depth + 1))
96 {
97 return true;
98 }
99 }
100 return false;
101}
102
103void Font::reset_state()
104{

Callers

nothing calls this directly

Calls 3

is_nullMethod · 0.45
getMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected