From eece29de7b888ccee3f758d2de0967ad674c87a3 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Tue, 28 Aug 2018 13:35:10 -0700 Subject: Removed redundant std::string -> string conversions. PiperOrigin-RevId: 210596417 --- tensorflow/cc/framework/cc_op_gen.cc | 2 +- tensorflow/cc/framework/scope.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tensorflow/cc') diff --git a/tensorflow/cc/framework/cc_op_gen.cc b/tensorflow/cc/framework/cc_op_gen.cc index c20ea95a15..a32d1b1eb5 100644 --- a/tensorflow/cc/framework/cc_op_gen.cc +++ b/tensorflow/cc/framework/cc_op_gen.cc @@ -466,7 +466,7 @@ string AvoidCPPKeywords(StringPiece name) { if (IsCPPKeyword(name)) { return strings::StrCat(name, "_"); } - return std::string(name); + return string(name); } void InferArgAttributes(const OpDef::ArgDef& arg, diff --git a/tensorflow/cc/framework/scope.cc b/tensorflow/cc/framework/scope.cc index 8c886f3171..7f6ac4cae7 100644 --- a/tensorflow/cc/framework/scope.cc +++ b/tensorflow/cc/framework/scope.cc @@ -225,7 +225,7 @@ std::unordered_set Scope::Impl::GetColocationConstraints( for (const string& entry : node_constraints) { StringPiece s(entry); if (str_util::ConsumePrefix(&s, kColocationGroupPrefix)) { - current_constraints.insert(std::string(s)); + current_constraints.emplace(s); } } } else { -- cgit v1.2.3