fix unused-lambda-capture on clang version 9.1 (#1823)

* fix unused-lambda-capture on clang9.1

* unused lambda capture fix continued

* lambda capture: NM

* lambda capture

* Fix linting.
This commit is contained in:
Alexey Tumanov
2018-04-04 11:04:10 -07:00
committed by Philipp Moritz
parent e0193a5501
commit 5a9e83761d
5 changed files with 7 additions and 9 deletions
+2 -3
View File
@@ -236,9 +236,8 @@ void TestLogAppendAt(const JobID &job_id, std::shared_ptr<gcs::AsyncGcsClient> c
RAY_CHECK_OK(client->task_reconstruction_log().AppendAt(job_id, task_id, data_log[1],
nullptr, failure_callback, 1));
auto lookup_callback = [task_id, managers](
gcs::AsyncGcsClient *client, const UniqueID &id,
const std::vector<TaskReconstructionDataT> &data) {
auto lookup_callback = [managers](gcs::AsyncGcsClient *client, const UniqueID &id,
const std::vector<TaskReconstructionDataT> &data) {
std::vector<std::string> appended_managers;
for (const auto &entry : data) {
appended_managers.push_back(entry.node_manager_id);
+1 -1
View File
@@ -90,7 +90,7 @@ Status Log<ID, Data>::Subscribe(const JobID &job_id, const ClientID &client_id,
auto d = std::shared_ptr<CallbackData>(
new CallbackData({client_id, nullptr, subscribe, done, this, client_}));
int64_t callback_index =
RedisCallbackManager::instance().add([this, d](const std::string &data) {
RedisCallbackManager::instance().add([d](const std::string &data) {
if (data.empty()) {
// No notification data is provided. This is the callback for the
// initial subscription request.
+2 -3
View File
@@ -60,9 +60,8 @@ ray::Status ObjectDirectory::ExecuteGetLocations(const ObjectID &object_id) {
// Note: Lookup must be synchronous for thread-safe access.
// For now, this is only accessed by the main thread.
ray::Status status = gcs_client_->object_table().Lookup(
job_id, object_id,
[this, object_id](gcs::AsyncGcsClient *client, const ObjectID &object_id,
const std::vector<ObjectTableDataT> &data) {
job_id, object_id, [this](gcs::AsyncGcsClient *client, const ObjectID &object_id,
const std::vector<ObjectTableDataT> &data) {
GetLocationsComplete(object_id, data);
});
return status;
+1 -1
View File
@@ -207,7 +207,7 @@ ray::Status ObjectManager::Push(const ObjectID &object_id, const ClientID &clien
transfer_queue_.QueueSend(client_id, object_id, info);
RAY_CHECK_OK(DequeueTransfers());
},
[this](const Status &status) {
[](const Status &status) {
// Push is best effort, so do nothing here.
});
RAY_CHECK_OK(status);
+1 -1
View File
@@ -92,7 +92,7 @@ void NodeManager::ClientAdded(gcs::AsyncGcsClient *client, const UniqueID &id,
};
ray::Status status = client->heartbeat_table().Subscribe(
UniqueID::nil(), UniqueID::nil(), heartbeat_added,
[this](gcs::AsyncGcsClient *client) {
[](gcs::AsyncGcsClient *client) {
RAY_LOG(DEBUG) << "heartbeat table subscription done callback called.";
});
RAY_CHECK_OK(status);