mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-12-02 18:53:58 +01:00
Log level/type: Use enum class instead of the awkward namespace trick.
Just a small cleanup I've wanted to do for a long time.
This commit is contained in:
1 parent
308e983a99
commit
1025bbcf89
19 files changed
+162
-170
No files matched your search
@@ -42,7 +42,7 @@ struct WebSocketClientInfo {
|
||||
};
|
||||
|
||||
struct DebuggerErrorEvent {
|
||||
DebuggerErrorEvent(const std::string m, LogTypes::LOG_LEVELS l, const JsonGet data = JsonValue(JSON_NULL))
|
||||
DebuggerErrorEvent(const std::string m, LogLevel l, const JsonGet data = JsonValue(JSON_NULL))
|
||||
: message(m), level(l) {
|
||||
// Need to format right away, before it's out of scope.
|
||||
if (data) {
|
||||
@@ -53,7 +53,7 @@ struct DebuggerErrorEvent {
|
||||
}
|
||||
|
||||
std::string message;
|
||||
LogTypes::LOG_LEVELS level;
|
||||
LogLevel level;
|
||||
std::string ticketRaw;
|
||||
|
||||
operator std::string() const {
|
||||
@@ -61,7 +61,7 @@ struct DebuggerErrorEvent {
|
||||
j.begin();
|
||||
j.writeString("event", "error");
|
||||
j.writeString("message", message);
|
||||
j.writeInt("level", level);
|
||||
j.writeInt("level", (int)level);
|
||||
if (!ticketRaw.empty()) {
|
||||
j.writeRaw("ticket", ticketRaw);
|
||||
}
|
||||
@@ -88,7 +88,7 @@ struct DebuggerRequest {
|
||||
WebSocketClientInfo *client;
|
||||
|
||||
void Fail(const std::string &message) {
|
||||
ws->Send(DebuggerErrorEvent(message, LogTypes::LERROR, data));
|
||||
ws->Send(DebuggerErrorEvent(message, LogLevel::LERROR, data));
|
||||
responseSent_ = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user