| 78 | } |
| 79 | |
| 80 | void GraphStruct::modifyType(size_t id, DataType newTy, std::string newName, |
| 81 | bool updateReferences) { |
| 82 | assert(id < types().size() && newTy.valid() && !newName.empty()); |
| 83 | |
| 84 | // invalidate the cache |
| 85 | module().updateLastEditTime(); |
| 86 | |
| 87 | mTypes[id] = {std::move(newName), std::move(newTy)}; |
| 88 | |
| 89 | // invalidate the current DataType |
| 90 | mDataType = {}; |
| 91 | |
| 92 | if (updateReferences) { updateNodeReferences(); } |
| 93 | } |
| 94 | |
| 95 | void GraphStruct::removeType(size_t id, bool updateReferences) { |
| 96 | assert(id < types().size()); |
nothing calls this directly
no test coverage detected