mu-priority: make to_string inline
And remove some dead code.
This commit is contained in:
@ -121,25 +121,6 @@ priority_name(Priority prio)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the name for a given priority (backward compatibility)
|
||||
*
|
||||
* @return the name
|
||||
*/
|
||||
constexpr const char*
|
||||
priority_name_c_str(Priority prio)
|
||||
{
|
||||
switch (prio) {
|
||||
case Priority::Low:
|
||||
return "low";
|
||||
case Priority::High:
|
||||
return "high";
|
||||
case Priority::Normal:
|
||||
default:
|
||||
return "normal";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a the message priority as a string
|
||||
*
|
||||
@ -147,7 +128,12 @@ priority_name_c_str(Priority prio)
|
||||
*
|
||||
* @return a string
|
||||
*/
|
||||
std::string to_string(Priority prio);
|
||||
constexpr std::string
|
||||
to_string(Priority prio)
|
||||
{
|
||||
return std::string{priority_name(prio)};
|
||||
}
|
||||
|
||||
|
||||
} // namespace Mu
|
||||
|
||||
|
||||
Reference in New Issue
Block a user