diff --git a/tensorflow/contrib/lite/testing/generated_examples_zip_test.cc b/tensorflow/contrib/lite/testing/generated_examples_zip_test.cc index f8f6044b626..3b3266738c7 100644 --- a/tensorflow/contrib/lite/testing/generated_examples_zip_test.cc +++ b/tensorflow/contrib/lite/testing/generated_examples_zip_test.cc @@ -102,7 +102,7 @@ class ZipEnvironment : public ::testing::Environment { tensorflow::SubProcess proc; string unzip_binary = "/usr/bin/unzip"; - proc.SetProgram(unzip_binary, {"unzip", "-d", dir, zip.c_str()}); + proc.SetProgram(unzip_binary, {"unzip", "-d", dir, zip}); proc.SetChannelAction(tensorflow::CHAN_STDOUT, tensorflow::ACTION_PIPE); proc.SetChannelAction(tensorflow::CHAN_STDERR, tensorflow::ACTION_PIPE); if (!proc.Start()) diff --git a/tensorflow/contrib/lite/toco/tooling_util.cc b/tensorflow/contrib/lite/toco/tooling_util.cc index 65bf1f215ad..21b85c86cc1 100644 --- a/tensorflow/contrib/lite/toco/tooling_util.cc +++ b/tensorflow/contrib/lite/toco/tooling_util.cc @@ -30,7 +30,6 @@ limitations under the License. #include "tensorflow/contrib/lite/toco/toco_port.h" #include "tensorflow/core/platform/logging.h" - namespace toco { string LogName(const Operator& op) { @@ -996,8 +995,7 @@ void ResolveModelFlags(const ModelFlags& model_flags, Model* model) { << dst_input_array->shape().dims(i); } } else { - dst_input_array->mutable_shape()->CopyFrom( - specified_input_array.shape()); + *dst_input_array->mutable_shape() = specified_input_array.shape(); } } diff --git a/tensorflow/core/grappler/optimizers/arithmetic_optimizer.cc b/tensorflow/core/grappler/optimizers/arithmetic_optimizer.cc index 9629e074ee1..d6bc8614f91 100644 --- a/tensorflow/core/grappler/optimizers/arithmetic_optimizer.cc +++ b/tensorflow/core/grappler/optimizers/arithmetic_optimizer.cc @@ -447,7 +447,7 @@ NodeDef* ArithmeticOptimizer::AddNode(const string& name, AddPrefixToNodeName(name, kArithmeticOptimizer); node_map_->AddNode(NodeName(name_with_prefix), new_node); if (node_to_copy != nullptr) { - new_node->CopyFrom(*node_to_copy); + *new_node = *node_to_copy; } new_node->set_name(name_with_prefix); return new_node; diff --git a/tensorflow/core/kernels/bucketize_op.cc b/tensorflow/core/kernels/bucketize_op.cc index c1693de5389..4e4b6d52154 100644 --- a/tensorflow/core/kernels/bucketize_op.cc +++ b/tensorflow/core/kernels/bucketize_op.cc @@ -25,10 +25,8 @@ limitations under the License. namespace tensorflow { -using thread::ThreadPool; - -typedef Eigen::ThreadPoolDevice CPUDevice; -typedef Eigen::GpuDevice GPUDevice; +using CPUDevice = Eigen::ThreadPoolDevice; +using GPUDevice = Eigen::GpuDevice; namespace functor { @@ -49,6 +47,7 @@ struct BucketizeFunctor { return Status::OK(); } }; + } // namespace functor template