]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
crush/CrushWrapper: clean up member init
authorSage Weil <sage@redhat.com>
Tue, 24 Apr 2018 14:16:52 +0000 (09:16 -0500)
committerSage Weil <sage@redhat.com>
Fri, 27 Apr 2018 16:12:43 +0000 (11:12 -0500)
Signed-off-by: Sage Weil <sage@redhat.com>
src/crush/CrushWrapper.h

index 5d306c50846fe3f529a104ebf269f49bd46debec..1c9316000784016abea182aa6e744dfe0bcacbf1 100644 (file)
@@ -74,12 +74,12 @@ public:
   std::map<int64_t, crush_choose_arg_map> choose_args;
 
 private:
-  struct crush_map *crush;
+  struct crush_map *crush = nullptr;
 
   bool have_uniform_rules = false;
 
   /* reverse maps */
-  mutable bool have_rmaps;
+  mutable bool have_rmaps = false;
   mutable std::map<string, int> type_rmap, name_rmap, rule_name_rmap;
   void build_rmaps() const {
     if (have_rmaps) return;
@@ -98,7 +98,7 @@ public:
   CrushWrapper(const CrushWrapper& other);
   const CrushWrapper& operator=(const CrushWrapper& other);
 
-  CrushWrapper() : crush(0), have_rmaps(false) {
+  CrushWrapper() {
     create();
   }
   ~CrushWrapper() {