| 993 | } |
| 994 | |
| 995 | bool GraphModule::removeStruct(boost::string_view name) { |
| 996 | // invalidate the cache |
| 997 | updateLastEditTime(); |
| 998 | |
| 999 | for (auto iter = structs().begin(); iter != structs().end(); ++iter) { |
| 1000 | if ((*iter)->name() == name) { |
| 1001 | mStructs.erase(iter); |
| 1002 | return true; |
| 1003 | } |
| 1004 | } |
| 1005 | |
| 1006 | // TODO: remove referencing nodes |
| 1007 | return false; |
| 1008 | } |
| 1009 | |
| 1010 | void GraphModule::removeStruct(GraphStruct* tyToDel) { |
| 1011 | assert(&tyToDel->module() == this); |
no test coverage detected