From: Sage Weil Date: Tue, 24 Apr 2018 14:16:52 +0000 (-0500) Subject: crush/CrushWrapper: clean up member init X-Git-Tag: v13.1.0~67^2~1 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=4bea8b55d35ac2dffcef10998b77357511863163;p=ceph-ci.git crush/CrushWrapper: clean up member init Signed-off-by: Sage Weil --- diff --git a/src/crush/CrushWrapper.h b/src/crush/CrushWrapper.h index 5d306c50846..1c931600078 100644 --- a/src/crush/CrushWrapper.h +++ b/src/crush/CrushWrapper.h @@ -74,12 +74,12 @@ public: std::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 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() {