Fix GCC warnings: -Wimplicit-fallthrough and -Wint-in-bool-context
authorWuzzy <Wuzzy2@mail.ru>
Sat, 21 Oct 2017 01:29:57 +0200
changeset 12725 1a393a59a594
parent 12724 d47ab9245259
child 12726 54300512e742
Fix GCC warnings: -Wimplicit-fallthrough and -Wint-in-bool-context
QTfrontend/hwform.cpp
--- a/QTfrontend/hwform.cpp	Sat Oct 21 00:58:01 2017 +0200
+++ b/QTfrontend/hwform.cpp	Sat Oct 21 01:29:57 2017 +0200
@@ -386,7 +386,7 @@
         setWindowState(windowState() | Qt::WindowFullScreen);
     else
     {
-        setWindowState(windowState() & static_cast<int>(!Qt::WindowFullScreen));
+        setWindowState(windowState() & ~Qt::WindowFullScreen);
     }
 }
 
@@ -1296,7 +1296,7 @@
     {
         case ID_PAGE_INGAME:
             MessageDialog::ShowErrorMessage(errmsg, this);
-            // no break
+            /* fallthrough */
         case ID_PAGE_NETGAME:
             ui.pageNetGame->displayError(errmsg);
             break;