| 609 | } |
| 610 | |
| 611 | static 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 | |
| 626 | static int _get_constant_location(Ref<Script> p_script, const StringName &p_constant) { |
| 627 | int depth = 0; |
no test coverage detected