Must support sorting so inheritance works properly (parent must be reloaded first)
| 551 | struct 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 | |
| 573 | void CSharpLanguage::reload_all_scripts() { |
nothing calls this directly
no test coverage detected