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

Method operator()

modules/mono/csharp_script.cpp:553–570  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

551struct CSharpScriptDepSort {
552 // Must support sorting so inheritance works properly (parent must be reloaded first)
553 bool operator()(const Ref<CSharpScript> &A, const Ref<CSharpScript> &B) const {
554 if (A == B) {
555 // Shouldn't happen but just in case...
556 return false;
557 }
558 const Script *I = B->get_base_script().ptr();
559 while (I) {
560 if (I == A.ptr()) {
561 // A is a base of B
562 return true;
563 }
564
565 I = I->get_base_script().ptr();
566 }
567
568 // A isn't a base of B
569 return false;
570 }
571};
572
573void CSharpLanguage::reload_all_scripts() {

Callers

nothing calls this directly

Calls 2

ptrMethod · 0.45
get_base_scriptMethod · 0.45

Tested by

no test coverage detected