]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
crimson/osd: use in-class initialization to init member variables
authorKefu Chai <kchai@redhat.com>
Thu, 10 Oct 2019 07:02:05 +0000 (15:02 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 10 Oct 2019 07:02:06 +0000 (15:02 +0800)
for better readability

Signed-off-by: Kefu Chai <kchai@redhat.com>
src/crimson/osd/osd_operations/compound_peering_request.cc

index be794ba2cfac019efc0a6b9975040e67a9003365..df2262a3bab984b0df9d07757bf55f4ff8b72873 100644 (file)
@@ -25,12 +25,10 @@ using namespace ceph::osd;
 
 struct compound_state {
   seastar::promise<BufferedRecoveryMessages> 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));
   }