MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / patchRefs

Function patchRefs

src/builtin/module_builtin_ast_serialize.cpp:69–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

67
68 template <typename TT>
69 void patchRefs ( vector<pair<TT**,SerializeNodeId>> & refs, const das_hash_map<SerializeNodeId, smart_ptr<TT>> & objects) {
70 for ( auto & p : refs ) {
71 auto it = objects.find(p.second);
72 if ( it == objects.end() ) {
73 throw dasException{"ast serializer function ref not found", LineInfo()};
74 } else {
75 *p.first = it->second.get();
76 }
77 }
78 refs.clear();
79 }
80
81 template <typename TT>
82 void patchRefs ( vector<pair<TT**,SerializeNodeId>> & refs, const das_hash_map<SerializeNodeId, TT*> & objects) {

Callers 1

patchMethod · 0.85

Calls 5

LineInfoClass · 0.50
findMethod · 0.45
endMethod · 0.45
getMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected