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
This commit is contained in:
Frederik Gladhorn 2018-10-31 09:18:12 +01:00 committed by Frederik Gladhorn
parent b07173232b
commit 04bbe10038

View file

@ -435,8 +435,6 @@ QModelIndex TabBoxHandler::nextPrev(bool forward) const
case TabBoxConfig::DesktopTabBox: case TabBoxConfig::DesktopTabBox:
model = d->desktopModel(); model = d->desktopModel();
break; break;
default:
return d->index;
} }
if (forward) { if (forward) {
int column = d->index.column() + 1; int column = d->index.column() + 1;
@ -612,8 +610,6 @@ QModelIndex TabBoxHandler::first() const
case TabBoxConfig::DesktopTabBox: case TabBoxConfig::DesktopTabBox:
model = d->desktopModel(); model = d->desktopModel();
break; break;
default:
return QModelIndex();
} }
return model->index(0, 0); return model->index(0, 0);
} }