From 7df32d115908ad12dbd6a015125662caa3a2da7f Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Mon, 15 May 2017 17:45:06 -0400 Subject: [PATCH] mon/PGMonitor: link PGStatService to the actual PGMap Signed-off-by: Sage Weil --- src/mon/PGMonitor.cc | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/src/mon/PGMonitor.cc b/src/mon/PGMonitor.cc index 15e22daebe857..c7b3e2258da2a 100644 --- a/src/mon/PGMonitor.cc +++ b/src/mon/PGMonitor.cc @@ -1671,19 +1671,13 @@ bool PGMonitor::check_sub(Subscription *sub) } return true; } -class PGMapStatService : public PGMap, public PGStatService { - PGMap& parent; +class PGMapStatService : public PGStatService { + const PGMap& parent; PGMonitor *pgmon; public: - PGMapStatService() : PGMap(), PGStatService(), - parent(*static_cast(this)), pgmon(nullptr) {} - PGMapStatService(const PGMap& o, - PGMonitor *pgm) : PGMap(o), PGStatService(), - parent(*static_cast(this)), - pgmon(pgm) {} - void reset(const PGMap& o) { - parent = o; - } + PGMapStatService(const PGMap& o, PGMonitor *pgm) + : parent(o), + pgmon(pgm) {} bool is_readable() const { return pgmon->is_readable(); } -- 2.39.5