From: Kefu Chai Date: Thu, 10 Oct 2019 07:02:05 +0000 (+0800) Subject: crimson/osd: use in-class initialization to init member variables X-Git-Tag: v15.1.0~1291^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=3ddc63b7d3a4fc1594267f6970f15b6d3327efe7;p=ceph.git crimson/osd: use in-class initialization to init member variables for better readability Signed-off-by: Kefu Chai --- diff --git a/src/crimson/osd/osd_operations/compound_peering_request.cc b/src/crimson/osd/osd_operations/compound_peering_request.cc index be794ba2cfa..df2262a3bab 100644 --- a/src/crimson/osd/osd_operations/compound_peering_request.cc +++ b/src/crimson/osd/osd_operations/compound_peering_request.cc @@ -25,12 +25,10 @@ using namespace ceph::osd; struct compound_state { seastar::promise promise; - BufferedRecoveryMessages ctx; - compound_state() - // assuming crimson-osd won't need to be compatible with pre-octopus - // releases - : ctx{ceph_release_t::octopus} - {} + // assuming crimson-osd won't need to be compatible with pre-octopus + // releases + BufferedRecoveryMessages ctx{ceph_release_t::octopus}; + compound_state() = default; ~compound_state() { promise.set_value(std::move(ctx)); }