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

@ -1,5 +1,5 @@
/* /*
** Copyright (C) 2022 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl> ** Copyright (C) 2022-2026 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
** **
** This program is free software; you can redistribute it and/or modify it ** This program is free software; you can redistribute it and/or modify it
** under the terms of the GNU General Public License as published by the ** under the terms of the GNU General Public License as published by the
@ -21,12 +21,6 @@
using namespace Mu; using namespace Mu;
std::string
Mu::to_string(Priority prio)
{
return std::string{priority_name(prio)};
}
/* /*
* tests... also build as runtime-tests, so we can get coverage info * tests... also build as runtime-tests, so we can get coverage info
*/ */

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 * Get a the message priority as a string
* *
@ -147,7 +128,12 @@ priority_name_c_str(Priority prio)
* *
* @return a string * @return a string
*/ */
std::string to_string(Priority prio); constexpr std::string
to_string(Priority prio)
{
return std::string{priority_name(prio)};
}
} // namespace Mu } // namespace Mu