aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/platform
diff options
context:
space:
mode:
authorGravatar A. Unique TensorFlower <gardener@tensorflow.org>2018-08-24 11:20:19 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-08-24 11:32:57 -0700
commit197309b5d56436b523b8b03ddf2a23555c37365e (patch)
tree99b4a7898511df29ffac6623cb54418330a4838f /tensorflow/core/platform
parent8925649d62ae24a2c34f74b69ac95a1bed369b44 (diff)
Removed redundant std::string -> string conversions.
PiperOrigin-RevId: 210127626
Diffstat (limited to 'tensorflow/core/platform')
-rw-r--r--tensorflow/core/platform/env.cc4
-rw-r--r--tensorflow/core/platform/file_system.cc2
-rw-r--r--tensorflow/core/platform/file_system_helper.cc2
-rw-r--r--tensorflow/core/platform/file_system_test.cc2
4 files changed, 5 insertions, 5 deletions
diff --git a/tensorflow/core/platform/env.cc b/tensorflow/core/platform/env.cc
index 47c59d435b..afc4201e53 100644
--- a/tensorflow/core/platform/env.cc
+++ b/tensorflow/core/platform/env.cc
@@ -92,7 +92,7 @@ Env::Env() : file_system_registry_(new FileSystemRegistryImpl) {}
Status Env::GetFileSystemForFile(const string& fname, FileSystem** result) {
StringPiece scheme, host, path;
io::ParseURI(fname, &scheme, &host, &path);
- FileSystem* file_system = file_system_registry_->Lookup(std::string(scheme));
+ FileSystem* file_system = file_system_registry_->Lookup(string(scheme));
if (!file_system) {
if (scheme.empty()) {
scheme = "[local]";
@@ -166,7 +166,7 @@ bool Env::FilesExist(const std::vector<string>& files,
for (const auto& file : files) {
StringPiece scheme, host, path;
io::ParseURI(file, &scheme, &host, &path);
- files_per_fs[std::string(scheme)].push_back(file);
+ files_per_fs[string(scheme)].push_back(file);
}
std::unordered_map<string, Status> per_file_status;
diff --git a/tensorflow/core/platform/file_system.cc b/tensorflow/core/platform/file_system.cc
index 922773684b..3ab542a5d8 100644
--- a/tensorflow/core/platform/file_system.cc
+++ b/tensorflow/core/platform/file_system.cc
@@ -158,7 +158,7 @@ Status FileSystem::RecursivelyCreateDir(const string& dirname) {
std::reverse(sub_dirs.begin(), sub_dirs.end());
// Now create the directories.
- string built_path = std::string(remaining_dir);
+ string built_path(remaining_dir);
for (const StringPiece sub_dir : sub_dirs) {
built_path = io::JoinPath(built_path, sub_dir);
Status status = CreateDir(io::CreateURI(scheme, host, built_path));
diff --git a/tensorflow/core/platform/file_system_helper.cc b/tensorflow/core/platform/file_system_helper.cc
index 0ba0e6304f..342cf28e38 100644
--- a/tensorflow/core/platform/file_system_helper.cc
+++ b/tensorflow/core/platform/file_system_helper.cc
@@ -59,7 +59,7 @@ Status GetMatchingPaths(FileSystem* fs, Env* env, const string& pattern,
string fixed_prefix = pattern.substr(0, pattern.find_first_of("*?[\\"));
string eval_pattern = pattern;
std::vector<string> all_files;
- string dir = std::string(io::Dirname(fixed_prefix));
+ string dir(io::Dirname(fixed_prefix));
// If dir is empty then we need to fix up fixed_prefix and eval_pattern to
// include . as the top level directory.
if (dir.empty()) {
diff --git a/tensorflow/core/platform/file_system_test.cc b/tensorflow/core/platform/file_system_test.cc
index c0a16c95f9..a637d42a92 100644
--- a/tensorflow/core/platform/file_system_test.cc
+++ b/tensorflow/core/platform/file_system_test.cc
@@ -125,7 +125,7 @@ class InterPlanetaryFileSystem : public NullFileSystem {
ASSERT_EQ(scheme, "ipfs");
ASSERT_EQ(host, "solarsystem");
str_util::ConsumePrefix(&path, "/");
- *parsed_path = std::string(path);
+ *parsed_path = string(path);
}
std::map<string, std::set<string>> celestial_bodies_ = {