]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
common/entity_name: un-inline methods to reduce header dependencies
authorMax Kellermann <max.kellermann@ionos.com>
Fri, 4 Oct 2024 13:45:48 +0000 (15:45 +0200)
committerMax Kellermann <max.kellermann@ionos.com>
Tue, 5 Aug 2025 08:28:01 +0000 (10:28 +0200)
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
src/common/entity_name.cc
src/common/entity_name.h

index 6e1ad62526eb1f7a53114d1513d13afb1c69120f..502f28f9d622d2a92db6e4b938ec25a165867a8a 100644 (file)
 
 using std::string;
 
+void EntityName::encode(ceph::buffer::list& bl) const {
+  using ceph::encode;
+  encode(type, bl);
+  encode(id, bl);
+}
+
+void EntityName::decode(ceph::buffer::list::const_iterator& bl) {
+  using ceph::decode;
+  uint32_t type_;
+  std::string id_;
+  decode(type_, bl);
+  decode(id_, bl);
+  set(type_, id_);
+}
 
 const std::array<EntityName::str_to_entity_type_t, 6> EntityName::STR_TO_ENTITY_TYPE = {{
   { CEPH_ENTITY_TYPE_AUTH, "auth" },
index 6967415d1b33968e41a5601f04a2e458045cccab..04aa666ad357498526a40eed0515060adbc5938d 100644 (file)
@@ -34,19 +34,8 @@ namespace ceph { class Formatter; }
  */
 struct EntityName
 {
-  void encode(ceph::buffer::list& bl) const {
-    using ceph::encode;
-    encode(type, bl);
-    encode(id, bl);
-  }
-  void decode(ceph::buffer::list::const_iterator& bl) {
-    using ceph::decode;
-    uint32_t type_;
-    std::string id_;
-    decode(type_, bl);
-    decode(id_, bl);
-    set(type_, id_);
-  }
+  void encode(ceph::buffer::list& bl) const;
+  void decode(ceph::buffer::list::const_iterator& bl);
   void dump(ceph::Formatter *f) const;
   static void generate_test_instances(std::list<EntityName*>& ls);
   const std::string& to_str() const;