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

Method _recurse_replace_function_ptrs

modules/gdscript/gdscript.cpp:1533–1548  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1531}
1532
1533void GDScript::_recurse_replace_function_ptrs(const HashMap<GDScriptFunction *, GDScriptFunction *> &p_replacements) const {
1534 MutexLock lock(func_ptrs_to_update_mutex);
1535 for (UpdatableFuncPtr *updatable : func_ptrs_to_update) {
1536 HashMap<GDScriptFunction *, GDScriptFunction *>::ConstIterator replacement = p_replacements.find(updatable->ptr);
1537 if (replacement) {
1538 updatable->ptr = replacement->value;
1539 } else {
1540 // Probably a lambda from another reload, ignore.
1541 updatable->ptr = nullptr;
1542 }
1543 }
1544
1545 for (HashMap<StringName, Ref<GDScript>>::ConstIterator subscript = subclasses.begin(); subscript; ++subscript) {
1546 subscript->value->_recurse_replace_function_ptrs(p_replacements);
1547 }
1548}
1549
1550void GDScript::clear(ClearData *p_clear_data) {
1551 if (clearing) {

Callers 1

compileMethod · 0.80

Calls 2

findMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected