| 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) { |