aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/main.cpp
diff options
context:
space:
mode:
authorEgor Tensin <egor@tensin.name>2026-06-18 20:20:05 +0200
committerEgor Tensin <egor@tensin.name>2026-06-18 20:20:05 +0200
commit24abd315a4532b77a634c90bf595953e58a229a9 (patch)
treea37fc2bd3904d7fe1348af11e827b89fe77b866b /src/main.cpp
parentcmake: treat warnings as errors (diff)
downloadprivilege-check-24abd315a4532b77a634c90bf595953e58a229a9.tar.gz
privilege-check-24abd315a4532b77a634c90bf595953e58a229a9.zip
fix a compiler warning
Diffstat (limited to '')
-rw-r--r--src/main.cpp10
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;