MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / _get_constant_location

Function _get_constant_location

modules/gdscript/gdscript_editor.cpp:611–624  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

609}
610
611static int _get_constant_location(const StringName &p_class, const StringName &p_constant) {
612 if (!ClassDB::has_integer_constant(p_class, p_constant)) {
613 return ScriptLanguage::LOCATION_OTHER;
614 }
615
616 int depth = 0;
617 StringName class_test = p_class;
618 while (class_test && !ClassDB::has_integer_constant(class_test, p_constant, true)) {
619 class_test = ClassDB::get_parent_class(class_test);
620 depth++;
621 }
622
623 return depth | ScriptLanguage::LOCATION_PARENT_MASK;
624}
625
626static int _get_constant_location(Ref<Script> p_script, const StringName &p_constant) {
627 int depth = 0;

Callers 1

Calls 4

is_validMethod · 0.45
get_member_lineMethod · 0.45
get_base_scriptMethod · 0.45

Tested by

no test coverage detected