aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/distributed_runtime/worker.cc
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/core/distributed_runtime/worker.cc')
-rw-r--r--tensorflow/core/distributed_runtime/worker.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/tensorflow/core/distributed_runtime/worker.cc b/tensorflow/core/distributed_runtime/worker.cc
index 34b53e965f..80c8f3ad3d 100644
--- a/tensorflow/core/distributed_runtime/worker.cc
+++ b/tensorflow/core/distributed_runtime/worker.cc
@@ -34,8 +34,8 @@ void Worker::GetStatusAsync(const GetStatusRequest* request,
std::vector<DeviceAttributes> devices;
dm->ListDeviceAttributes(&devices);
response->mutable_device_attributes()->Reserve(devices.size());
- for (size_t i = 0; i < devices.size(); ++i) {
- response->add_device_attributes()->Swap(&devices[i]);
+ for (auto& d : devices) {
+ response->add_device_attributes()->Swap(&d);
}
done(Status::OK());
}