diff options
author | 2018-05-07 11:05:56 -0700 | |
---|---|---|
committer | 2018-05-07 16:39:29 -0700 | |
commit | 170634d5a10a94d3bd12cc794c284eafcf47fa54 (patch) | |
tree | b07ae2bc52c3e74911ac218c80904b7ab4117853 /tensorflow/core/graph/graph_def_builder.h | |
parent | 9ba26ca0d59989592051fdb5c7a2caabe4f399f3 (diff) |
Replaced calls to tensorflow::StringPiece::ToString with std::string conversions.
That is, instances of sp.ToString() are replaced with std::string(sp).
This will allow tensorflow::StringPiece::ToString to be removed, which is necessary before it can be replaced with absl::string_view.
PiperOrigin-RevId: 195689392
Diffstat (limited to 'tensorflow/core/graph/graph_def_builder.h')
-rw-r--r-- | tensorflow/core/graph/graph_def_builder.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tensorflow/core/graph/graph_def_builder.h b/tensorflow/core/graph/graph_def_builder.h index 776a74c6d8..0d6aae4355 100644 --- a/tensorflow/core/graph/graph_def_builder.h +++ b/tensorflow/core/graph/graph_def_builder.h @@ -128,7 +128,7 @@ class GraphDefBuilder { Options WithControlInputsImpl(gtl::ArraySlice<Node*> control_inputs); template <class T> Options WithAttrImpl(StringPiece name, T&& value) { - attrs_.emplace_back(name.ToString(), AttrValue()); + attrs_.emplace_back(std::string(name), AttrValue()); SetAttrValue(std::forward<T>(value), &attrs_.back().second); return *this; } |