@return non-nullptr NodeDef that has valid Node or an error
| 415 | |
| 416 | // @return non-nullptr NodeDef that has valid Node or an error |
| 417 | Status LookupNode(NodeId id, NodeDef** node_def) { |
| 418 | if (id >= nodes_.size()) { |
| 419 | return OutOfRangeError("NodeId is out of range"); |
| 420 | } |
| 421 | auto& n = nodes_[id]; |
| 422 | if (!n.node) { |
| 423 | return OutOfRangeError("Node is already deleted"); |
| 424 | } |
| 425 | *node_def = &n; |
| 426 | return OkStatus(); |
| 427 | } |
| 428 | |
| 429 | // @return non-nullptr ValueDef that has valid Value or an error |
| 430 | Status LookupValue(ValueId id, ValueDef** value_def) { |
nothing calls this directly
no test coverage detected