]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: return string_view for type str
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 18 Dec 2018 23:10:30 +0000 (15:10 -0800)
committerPatrick Donnelly <pdonnell@redhat.com>
Wed, 2 Jan 2019 22:12:22 +0000 (14:12 -0800)
This is a cheap refactor.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mds/PurgeQueue.cc
src/mds/PurgeQueue.h

index 1c4577a3e543e5337fa13bfa32c6b537eac7f56b..62c77184da2cc67a13e9d1e65bc3400bbf25cb99 100644 (file)
@@ -671,7 +671,7 @@ bool PurgeQueue::drain(
   return false;
 }
 
-std::string PurgeItem::get_type_str() const
+std::string_view PurgeItem::get_type_str() const
 {
   switch(action) {
   case PurgeItem::NONE: return "NONE";
index 1c18482d401b7c73c75af7556f063834c0f25246..f762a426f769a72d3c9716f709735f99e8db7536 100644 (file)
@@ -76,7 +76,7 @@ public:
     f->close_section();
   }
 
-  std::string get_type_str() const;
+  std::string_view get_type_str() const;
 private:
   static const std::map<std::string, PurgeItem::Action> actions;
 };