mds: return string_view for type str

This is a cheap refactor.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
This commit is contained in:
Patrick Donnelly 2018-12-18 15:10:30 -08:00
parent c7350ac23c
commit e540028cba
No known key found for this signature in database
GPG Key ID: 3A2A7E25BEA8AADB
2 changed files with 2 additions and 2 deletions

View 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";

View 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;
};