mu-priority: make to_string inline

And remove some dead code.
This commit is contained in:
Dirk-Jan C. Binnema
2026-07-23 11:12:00 +03:00
committed by Seth Ladygo
parent a03fd48551
commit 19b2bdd6e4
2 changed files with 7 additions and 27 deletions

View File

@ -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