From b1c8e44cdd85488bc07565f13411a6aef6d238cc Mon Sep 17 00:00:00 2001 From: Derek Murray Date: Wed, 31 Jul 2019 09:09:31 -0700 Subject: [PATCH] Fix compiler warnings in worker_cache_wrapper.h. PiperOrigin-RevId: 260937903 --- .../worker_cache_wrapper.h | 25 +++++++++---------- 1 file changed, 12 insertions(+), 13 deletions(-) diff --git a/tensorflow/core/distributed_runtime/worker_cache_wrapper.h b/tensorflow/core/distributed_runtime/worker_cache_wrapper.h index 22f9c2abd6a..9d495ea48be 100644 --- a/tensorflow/core/distributed_runtime/worker_cache_wrapper.h +++ b/tensorflow/core/distributed_runtime/worker_cache_wrapper.h @@ -29,11 +29,11 @@ class WorkerCacheWrapper : public WorkerCacheInterface { // Updates *workers with strings naming the remote worker tasks to // which open channels have been established. - virtual void ListWorkers(std::vector* workers) const { + void ListWorkers(std::vector* workers) const override { return wrapped_->ListWorkers(workers); } - virtual void ListWorkersInJob(const string& job_name, - std::vector* workers) const { + void ListWorkersInJob(const string& job_name, + std::vector* workers) const override { return wrapped_->ListWorkersInJob(job_name, workers); } @@ -41,7 +41,7 @@ class WorkerCacheWrapper : public WorkerCacheInterface { // or can be constructed, returns a pointer to a WorkerInterface object // wrapping that channel. The returned value must be destroyed by // calling `this->ReleaseWorker(target, ret)` - virtual WorkerInterface* GetOrCreateWorker(const string& target) { + WorkerInterface* GetOrCreateWorker(const string& target) override { return wrapped_->GetOrCreateWorker(target); } @@ -50,7 +50,7 @@ class WorkerCacheWrapper : public WorkerCacheInterface { // TODO(jeff,sanjay): Consider moving target into WorkerInterface. // TODO(jeff,sanjay): Unify all worker-cache impls and factor out a // per-rpc-subsystem WorkerInterface creator. - virtual void ReleaseWorker(const string& target, WorkerInterface* worker) { + void ReleaseWorker(const string& target, WorkerInterface* worker) override { return wrapped_->ReleaseWorker(target, worker); } @@ -63,29 +63,28 @@ class WorkerCacheWrapper : public WorkerCacheInterface { // within its local environment. Returns true if *locality // was set, using only locally cached data. Returns false // if status data for that device was not available. Never blocks. - virtual bool GetDeviceLocalityNonBlocking(const string& device, - DeviceLocality* locality) { + bool GetDeviceLocalityNonBlocking(const string& device, + DeviceLocality* locality) override { return wrapped_->GetDeviceLocalityNonBlocking(device, locality); } // Set *locality with the DeviceLocality of the specified remote device // within its local environment. Callback gets Status::OK if *locality // was set. - virtual void GetDeviceLocalityAsync(const string& device, - DeviceLocality* locality, - StatusCallback done) { + void GetDeviceLocalityAsync(const string& device, DeviceLocality* locality, + StatusCallback done) override { return wrapped_->GetDeviceLocalityAsync(device, locality, std::move(done)); } // Start/stop logging activity. - virtual void SetLogging(bool active) { wrapped_->SetLogging(active); } + void SetLogging(bool active) override { wrapped_->SetLogging(active); } // Discard any saved log data. - virtual void ClearLogs() { wrapped_->ClearLogs(); } + void ClearLogs() override { wrapped_->ClearLogs(); } // Return logs for the identified step in *ss. Any returned data will no // longer be stored. - virtual bool RetrieveLogs(int64 step_id, StepStats* ss) { + bool RetrieveLogs(int64 step_id, StepStats* ss) override { return wrapped_->RetrieveLogs(step_id, ss); }