| 220 | } |
| 221 | |
| 222 | void Node::MaybeCopyOnWrite() { |
| 223 | // NodeProperties may be shared between Nodes. Make a copy if so. |
| 224 | if (!props_.unique()) { |
| 225 | props_ = std::make_shared<NodeProperties>(*props_); |
| 226 | } |
| 227 | } |
| 228 | |
| 229 | AttrValue* Node::AddAttrHelper(const string& name) { |
| 230 | MaybeCopyOnWrite(); |
no outgoing calls
no test coverage detected