aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/debug
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-08-28 13:35:10 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-08-28 13:41:11 -0700
commiteece29de7b888ccee3f758d2de0967ad674c87a3 (patch)
treefd74e39d4e6e47f1cc38cbff7307f8f312e9be50 /tensorflow/core/debug
parent88ab8b0bd6ca4dba10a5ed8852e23eacfb0f888e (diff)
Removed redundant std::string -> string conversions.
PiperOrigin-RevId: 210596417
Diffstat (limited to 'tensorflow/core/debug')
-rw-r--r--tensorflow/core/debug/debug_graph_utils.cc4
-rw-r--r--tensorflow/core/debug/debug_io_utils.cc10
2 files changed, 7 insertions, 7 deletions
diff --git a/tensorflow/core/debug/debug_graph_utils.cc b/tensorflow/core/debug/debug_graph_utils.cc
index 7641edea52..5fc95a8f20 100644
--- a/tensorflow/core/debug/debug_graph_utils.cc
+++ b/tensorflow/core/debug/debug_graph_utils.cc
@@ -356,8 +356,8 @@ Status DebugNodeInserter::ParseDebugOpName(
"Malformed attributes in debug op name \"", debug_op_name, "\"");
}
- const string key = std::string(seg.substr(0, eq_index));
- const string value = std::string(
+ const string key(seg.substr(0, eq_index));
+ const string value(
seg.substr(eq_index + 1, attribute_seg.size() - eq_index - 1));
if (key.empty() || value.empty()) {
return errors::InvalidArgument(
diff --git a/tensorflow/core/debug/debug_io_utils.cc b/tensorflow/core/debug/debug_io_utils.cc
index 9e8002d490..949d034dea 100644
--- a/tensorflow/core/debug/debug_io_utils.cc
+++ b/tensorflow/core/debug/debug_io_utils.cc
@@ -399,8 +399,8 @@ Status DebugIO::PublishDebugMetadata(
strings::Printf("%.14lld", session_run_index))),
Env::Default()->NowMicros());
status.Update(DebugFileIO::DumpEventProtoToFile(
- event, std::string(io::Dirname(core_metadata_path)),
- std::string(io::Basename(core_metadata_path))));
+ event, string(io::Dirname(core_metadata_path)),
+ string(io::Basename(core_metadata_path))));
}
}
@@ -632,8 +632,8 @@ Status DebugFileIO::DumpTensorToEventFile(const DebugNodeKey& debug_node_key,
std::vector<Event> events;
TF_RETURN_IF_ERROR(
WrapTensorAsEvents(debug_node_key, tensor, wall_time_us, 0, &events));
- return DumpEventProtoToFile(events[0], std::string(io::Dirname(file_path)),
- std::string(io::Basename(file_path)));
+ return DumpEventProtoToFile(events[0], string(io::Dirname(file_path)),
+ string(io::Basename(file_path)));
}
Status DebugFileIO::RecursiveCreateDir(Env* env, const string& dir) {
@@ -642,7 +642,7 @@ Status DebugFileIO::RecursiveCreateDir(Env* env, const string& dir) {
return Status::OK();
}
- string parent_dir = std::string(io::Dirname(dir));
+ string parent_dir(io::Dirname(dir));
if (!env->FileExists(parent_dir).ok()) {
// The parent path does not exist yet, create it first.
Status s = RecursiveCreateDir(env, parent_dir); // Recursive call