From 41e95e7cd6299b00dd690adf2f67e600264d8a8f Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Thu, 28 Jan 2016 11:52:45 +0100 Subject: [PATCH] rgw/rgw_common.h: init members in ctor init list instead of body Signed-off-by: Danny Al-Gaaf --- src/rgw/rgw_common.h | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/src/rgw/rgw_common.h b/src/rgw/rgw_common.h index 1034b57e49dcb..823c0cb819fb3 100644 --- a/src/rgw/rgw_common.h +++ b/src/rgw/rgw_common.h @@ -622,14 +622,10 @@ struct rgw_bucket { */ rgw_bucket() { } - rgw_bucket(const cls_user_bucket& b) { - name = b.name; - data_pool = b.data_pool; - data_extra_pool = b.data_extra_pool; - index_pool = b.index_pool; - marker = b.marker; - bucket_id = b.bucket_id; - } + rgw_bucket(const cls_user_bucket& b) : name(b.name), data_pool(b.data_pool), + data_extra_pool(b.data_extra_pool), + index_pool(b.index_pool), marker(b.marker), + bucket_id(b.bucket_id) {} rgw_bucket(const char *n) : name(n) { assert(*n == '.'); // only rgw private buckets should be initialized without pool data_pool = index_pool = n; @@ -1187,13 +1183,11 @@ struct RGWBucketEnt { RGWBucketEnt() : size(0), size_rounded(0), creation_time(0), count(0) {} - RGWBucketEnt(const cls_user_bucket_entry& e) { - bucket = e.bucket; - size = e.size; - size_rounded = e.size_rounded; - creation_time = e.creation_time; - count = e.count; - } + RGWBucketEnt(const cls_user_bucket_entry& e) : bucket(e.bucket), + size(e.size), + size_rounded(e.size_rounded), + creation_time(e.creation_time), + count(e.count) {} void convert(cls_user_bucket_entry *b) { bucket.convert(&b->bucket); -- 2.39.5