From ddd4c842f1eb34097cc3f8795c823fd044a56fc4 Mon Sep 17 00:00:00 2001 From: Robert Nishihara Date: Sun, 23 Dec 2018 02:44:23 -0800 Subject: [PATCH] Initialize some variables in constructor instead of header file. (#3617) * Initialize some variables in constructor instead of header file --- src/ray/object_manager/object_store_notification_manager.cc | 6 +++++- src/ray/object_manager/object_store_notification_manager.h | 6 +++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/ray/object_manager/object_store_notification_manager.cc b/src/ray/object_manager/object_store_notification_manager.cc index e80925836..fce65a607 100644 --- a/src/ray/object_manager/object_store_notification_manager.cc +++ b/src/ray/object_manager/object_store_notification_manager.cc @@ -14,7 +14,11 @@ namespace ray { ObjectStoreNotificationManager::ObjectStoreNotificationManager( boost::asio::io_service &io_service, const std::string &store_socket_name) - : store_client_(), socket_(io_service) { + : store_client_(), + length_(0), + num_adds_processed_(0), + num_removes_processed_(0), + socket_(io_service) { ARROW_CHECK_OK(store_client_.Connect(store_socket_name.c_str())); ARROW_CHECK_OK(store_client_.Subscribe(&c_socket_)); diff --git a/src/ray/object_manager/object_store_notification_manager.h b/src/ray/object_manager/object_store_notification_manager.h index 1cac578ae..45d131602 100644 --- a/src/ray/object_manager/object_store_notification_manager.h +++ b/src/ray/object_manager/object_store_notification_manager.h @@ -67,9 +67,9 @@ class ObjectStoreNotificationManager { plasma::PlasmaClient store_client_; int c_socket_; - int64_t length_ = 0; - int64_t num_adds_processed_ = 0; - int64_t num_removes_processed_ = 0; + int64_t length_; + int64_t num_adds_processed_; + int64_t num_removes_processed_; std::vector notification_; boost::asio::local::stream_protocol::socket socket_; };