From: Patrick Donnelly Date: Fri, 21 Feb 2020 19:28:18 +0000 (-0800) Subject: mds: inline mds_role_t stream operator X-Git-Tag: v15.1.1~265^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=13e8fc8e711708a712560fcc1d9fb7410c5ab330;p=ceph.git mds: inline mds_role_t stream operator Signed-off-by: Patrick Donnelly --- diff --git a/src/mds/mdstypes.cc b/src/mds/mdstypes.cc index 76cd4576c18..b7f5d87cfa5 100644 --- a/src/mds/mdstypes.cc +++ b/src/mds/mdstypes.cc @@ -924,11 +924,3 @@ void snaprealm_reconnect_t::generate_test_instances(std::listrealm.seq = 2; ls.back()->realm.parent = 1; } - - -ostream& operator<<(ostream &out, const mds_role_t &role) -{ - out << role.fscid << ":" << role.rank; - return out; -} - diff --git a/src/mds/mdstypes.h b/src/mds/mdstypes.h index c3e741cb6a9..ddaed5666d6 100644 --- a/src/mds/mdstypes.h +++ b/src/mds/mdstypes.h @@ -104,7 +104,9 @@ public: fs_cluster_id_t fscid = FS_CLUSTER_ID_NONE; mds_rank_t rank = MDS_RANK_NONE; }; -std::ostream& operator<<(std::ostream &out, const mds_role_t &role); +inline std::ostream& operator<<(std::ostream& out, const mds_role_t& role) { + return out << role.fscid << ":" << role.rank; +} // CAPS inline string gcap_string(int cap)