From 8e28f900b8aabf6a620f36b09576a123f5c5e88e Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 24 Apr 2018 09:16:52 -0500 Subject: [PATCH] crush/CrushWrapper: clean up member init Signed-off-by: Sage Weil (cherry picked from commit 4bea8b55d35ac2dffcef10998b77357511863163) --- src/crush/CrushWrapper.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/crush/CrushWrapper.h b/src/crush/CrushWrapper.h index 64e63760c75..7c3d3a5b4e8 100644 --- a/src/crush/CrushWrapper.h +++ b/src/crush/CrushWrapper.h @@ -73,12 +73,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; @@ -97,7 +97,7 @@ public: CrushWrapper(const CrushWrapper& other); const CrushWrapper& operator=(const CrushWrapper& other); - CrushWrapper() : crush(0), have_rmaps(false) { + CrushWrapper() { create(); } ~CrushWrapper() { -- 2.47.3