From 04bbe1003882c1c3b9c1b3dd5ee2945ae22e3e2b Mon Sep 17 00:00:00 2001 From: Frederik Gladhorn Date: Wed, 31 Oct 2018 09:18:12 +0100 Subject: [PATCH] Remove dead default branches Summary: The switch statements iterated over all possible enum values. When a new enum value is added, it will generate a compiler warning this way. Reviewers: davidedmundson Reviewed By: davidedmundson Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D16480 --- tabbox/tabboxhandler.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tabbox/tabboxhandler.cpp b/tabbox/tabboxhandler.cpp index 9d8f16ce78..e7bfb59bfc 100644 --- a/tabbox/tabboxhandler.cpp +++ b/tabbox/tabboxhandler.cpp @@ -435,8 +435,6 @@ QModelIndex TabBoxHandler::nextPrev(bool forward) const case TabBoxConfig::DesktopTabBox: model = d->desktopModel(); break; - default: - return d->index; } if (forward) { int column = d->index.column() + 1; @@ -612,8 +610,6 @@ QModelIndex TabBoxHandler::first() const case TabBoxConfig::DesktopTabBox: model = d->desktopModel(); break; - default: - return QModelIndex(); } return model->index(0, 0); }