diff options
| author | Egor Tensin <egor@tensin.name> | 2026-06-18 20:20:05 +0200 |
|---|---|---|
| committer | Egor Tensin <egor@tensin.name> | 2026-06-18 20:20:05 +0200 |
| commit | 24abd315a4532b77a634c90bf595953e58a229a9 (patch) | |
| tree | a37fc2bd3904d7fe1348af11e827b89fe77b866b /src/main.cpp | |
| parent | cmake: treat warnings as errors (diff) | |
| download | privilege-check-24abd315a4532b77a634c90bf595953e58a229a9.tar.gz privilege-check-24abd315a4532b77a634c90bf595953e58a229a9.zip | |
fix a compiler warning
Diffstat (limited to '')
| -rw-r--r-- | src/main.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
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<int>(ret); - } + if (ret == -1) + error::report(error::make("DialogBoxW")); + return static_cast<int>(ret); } catch (const std::exception& e) { error::report(e); return 1; |
