diff options
-rw-r--r-- | Userland/Libraries/LibChess/UCICommand.h | 4 | ||||
-rw-r--r-- | Userland/Libraries/LibChess/UCIEndpoint.cpp | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibChess/UCICommand.h b/Userland/Libraries/LibChess/UCICommand.h index 0b5ae607cb..80a9980566 100644 --- a/Userland/Libraries/LibChess/UCICommand.h +++ b/Userland/Libraries/LibChess/UCICommand.h @@ -15,7 +15,7 @@ namespace Chess::UCI { class Command : public Core::Event { public: - enum Type { + enum class Type { // GUI to engine commands. UCI = 12000, Debug, @@ -40,7 +40,7 @@ public: }; explicit Command(Type type) - : Core::Event(type) + : Core::Event(to_underlying(type)) { } diff --git a/Userland/Libraries/LibChess/UCIEndpoint.cpp b/Userland/Libraries/LibChess/UCIEndpoint.cpp index 0c8723b9db..6c107a101c 100644 --- a/Userland/Libraries/LibChess/UCIEndpoint.cpp +++ b/Userland/Libraries/LibChess/UCIEndpoint.cpp @@ -29,7 +29,7 @@ void Endpoint::send_command(Command const& command) void Endpoint::event(Core::Event& event) { - switch (event.type()) { + switch (static_cast<Command::Type>(event.type())) { case Command::Type::UCI: return handle_uci(); case Command::Type::Debug: |