diff options
author | Igor Ganichev <iga@google.com> | 2017-08-24 16:00:28 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-08-24 16:04:29 -0700 |
commit | b2ce451502154bcf13723e719ed2bfaed2814b15 (patch) | |
tree | 4808cc4b0c2a5a8e9812f7f370afe2442c430784 /tensorflow/core/graph/graph.cc | |
parent | 0a2f40e92d7f9a81b482027fd38c1bc429369abd (diff) |
Make Graph::IsValidNode public
It can be reimplemented with existing public APIs, but instead of doing so,
making this one public seems better.
PiperOrigin-RevId: 166407897
Diffstat (limited to 'tensorflow/core/graph/graph.cc')
-rw-r--r-- | tensorflow/core/graph/graph.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tensorflow/core/graph/graph.cc b/tensorflow/core/graph/graph.cc index 241e093eea..7d938365c5 100644 --- a/tensorflow/core/graph/graph.cc +++ b/tensorflow/core/graph/graph.cc @@ -503,17 +503,17 @@ string Graph::NewName(StringPiece prefix) { return strings::StrCat(prefix, "/_", name_counter_++); } -Status Graph::IsValidNode(Node* node) const { +Status Graph::IsValidNode(const Node* node) const { if (node == nullptr) { return errors::InvalidArgument("Node is null"); } const int id = node->id(); if (id < 0) { - return errors::InvalidArgument("node id ", id, "is less than zero"); + return errors::InvalidArgument("node id ", id, " is less than zero"); } if (static_cast<size_t>(id) >= nodes_.size()) { return errors::InvalidArgument( - "node id ", id, "is >= than number of nodes in graph ", nodes_.size()); + "node id ", id, " is >= than number of nodes in graph ", nodes_.size()); } if (nodes_[id] != node) { return errors::InvalidArgument("Node with id ", id, |