From: Patrick Donnelly Date: Wed, 19 Nov 2025 18:10:27 +0000 (-0500) Subject: mon/MonMap: cleanup initialization X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=fe645caefa50010080eef490b2c096c3f4fae2ec;p=ceph.git mon/MonMap: cleanup initialization Signed-off-by: Patrick Donnelly (cherry picked from commit 42a37916ff5c69d7df4d917cd9e143b4e92d389f) --- diff --git a/src/mon/MonMap.h b/src/mon/MonMap.h index 34f160c1ffd7..0d8f96407adf 100644 --- a/src/mon/MonMap.h +++ b/src/mon/MonMap.h @@ -79,8 +79,7 @@ struct mon_info_t { : name(n), public_addrs(p_addrs) { } - mon_info_t() { } - + mon_info_t() = default; void encode(ceph::buffer::list& bl, uint64_t features) const; void decode(ceph::buffer::list::const_iterator& p); @@ -97,7 +96,7 @@ inline std::ostream& operator<<(std::ostream& out, const mon_info_t& mon) { class MonMap { public: - epoch_t epoch; // what epoch/version of the monmap + epoch_t epoch{0}; // what epoch/version of the monmap uuid_d fsid; utime_t last_changed; utime_t created; @@ -180,9 +179,7 @@ public: } } - MonMap() - : epoch(0) { - } + MonMap() = default; uuid_d& get_fsid() { return fsid; }