From 24abd315a4532b77a634c90bf595953e58a229a9 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Thu, 18 Jun 2026 20:20:05 +0200 Subject: fix a compiler warning --- src/main.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/main.cpp b/src/main.cpp index b228175..eb17c72 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -190,13 +190,9 @@ INT_PTR CALLBACK dialog_main(HWND wnd, UINT msg, WPARAM wParam, LPARAM lParam) { int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) { try { const auto ret = DialogBoxW(instance, MAKEINTRESOURCE(IDD_MAINDIALOG), NULL, dialog_main); - - switch (ret) { - case -1: - error::report(error::make("DialogBoxW")); - default: - return static_cast(ret); - } + if (ret == -1) + error::report(error::make("DialogBoxW")); + return static_cast(ret); } catch (const std::exception& e) { error::report(e); return 1; -- cgit v1.3