]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MonMap: cleanup initialization
authorPatrick Donnelly <pdonnell@ibm.com>
Wed, 19 Nov 2025 18:10:27 +0000 (13:10 -0500)
committerPatrick Donnelly <pdonnell@ibm.com>
Wed, 18 Mar 2026 00:34:05 +0000 (20:34 -0400)
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
(cherry picked from commit 42a37916ff5c69d7df4d917cd9e143b4e92d389f)

src/mon/MonMap.h

index 34f160c1ffd746d578916b4b3743f9a1f2fe5aff..0d8f96407adf4741fb5c32196f33710d8dfd124d 100644 (file)
@@ -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; }