loader: Make ResultStatus directly compatible with fmt
We can make the enum class type compatible with fmt by providing an overload of operator<<. While we're at it, perform proper bounds checking. If something exceeds the array, it should be a hard fail, because it's, without a doubt, a programmer error in this case.
This commit is contained in:
@ -5,6 +5,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <algorithm>
|
||||
#include <iosfwd>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
@ -94,8 +95,7 @@ enum class ResultStatus : u16 {
|
||||
ErrorNoControl,
|
||||
};
|
||||
|
||||
std::string GetMessageForResultStatus(ResultStatus status);
|
||||
std::string GetMessageForResultStatus(u16 status);
|
||||
std::ostream& operator<<(std::ostream& os, ResultStatus status);
|
||||
|
||||
/// Interface for loading an application
|
||||
class AppLoader : NonCopyable {
|
||||
|
Reference in New Issue
Block a user