]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw/rgw_common.h: init members in ctor init list instead of body
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 28 Jan 2016 10:52:45 +0000 (11:52 +0100)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Fri, 29 Jan 2016 20:51:17 +0000 (21:51 +0100)
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/rgw/rgw_common.h

index 1034b57e49dcb409a2096c3562d0db208c8fa09c..823c0cb819fb35aa060760d34316ffcea278b785 100644 (file)
@@ -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);