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

Function _get_method_location

modules/gdscript/gdscript_editor.cpp:667–680  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

665}
666
667static int _get_method_location(const StringName &p_class, const StringName &p_method) {
668 if (!ClassDB::has_method(p_class, p_method)) {
669 return ScriptLanguage::LOCATION_OTHER;
670 }
671
672 int depth = 0;
673 StringName class_test = p_class;
674 while (class_test && !ClassDB::has_method(class_test, p_method, true)) {
675 class_test = ClassDB::get_parent_class(class_test);
676 depth++;
677 }
678
679 return depth | ScriptLanguage::LOCATION_PARENT_MASK;
680}
681
682static int _get_enum_constant_location(const StringName &p_class, const StringName &p_enum_constant) {
683 if (!ClassDB::get_integer_constant_enum(p_class, p_enum_constant)) {

Callers 1

Calls 1

has_methodFunction · 0.85

Tested by

no test coverage detected