MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / operator()

Method operator()

modules/gdscript/gdscript.cpp:2529–2544  ·  view source on GitHub ↗

must support sorting so inheritance works properly (parent must be reloaded first)

Source from the content-addressed store, hash-verified

2527struct GDScriptDepSort {
2528 //must support sorting so inheritance works properly (parent must be reloaded first)
2529 bool operator()(const Ref<GDScript> &A, const Ref<GDScript> &B) const {
2530 if (A == B) {
2531 return false; //shouldn't happen but..
2532 }
2533 const GDScript *I = B->get_base().ptr();
2534 while (I) {
2535 if (I == A.ptr()) {
2536 // A is a base of B
2537 return true;
2538 }
2539
2540 I = I->get_base().ptr();
2541 }
2542
2543 return false; //not a base
2544 }
2545};
2546
2547void GDScriptLanguage::reload_all_scripts() {

Callers

nothing calls this directly

Calls 2

ptrMethod · 0.45
get_baseMethod · 0.45

Tested by

no test coverage detected