main: Resolve error string not displaying
During the transition to make the error dialog translatable, I accidentally got rid of the conversion to ResultStatus, which prevented operator<< from being invoked during formatting. This adds a function to directly retrieve the result status string instead so that it displays again.
This commit is contained in:
parent
71e18dddbe
commit
86592b274e
3 changed files with 8 additions and 2 deletions
|
@ -185,6 +185,10 @@ constexpr std::array<const char*, 66> RESULT_MESSAGES{
|
|||
"The INI file contains more than the maximum allowable number of KIP files.",
|
||||
};
|
||||
|
||||
std::string GetResultStatusString(ResultStatus status) {
|
||||
return RESULT_MESSAGES.at(static_cast<std::size_t>(status));
|
||||
}
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, ResultStatus status) {
|
||||
os << RESULT_MESSAGES.at(static_cast<std::size_t>(status));
|
||||
return os;
|
||||
|
|
|
@ -135,6 +135,7 @@ enum class ResultStatus : u16 {
|
|||
ErrorINITooManyKIPs,
|
||||
};
|
||||
|
||||
std::string GetResultStatusString(ResultStatus status);
|
||||
std::ostream& operator<<(std::ostream& os, ResultStatus status);
|
||||
|
||||
/// Interface for loading an application
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue