From 42f47e483da19079a937c4801ca94bd62d8dc970 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 21 Aug 2017 22:44:29 +0300 Subject: Remove useless else. --- src/gui/widgets/guitable.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/gui/widgets/guitable.cpp') diff --git a/src/gui/widgets/guitable.cpp b/src/gui/widgets/guitable.cpp index 9ff2075b1..4a0f88246 100644 --- a/src/gui/widgets/guitable.cpp +++ b/src/gui/widgets/guitable.cpp @@ -608,13 +608,10 @@ Widget *GuiTable::getWidgetAt(int x, int y) if (row > -1 && column > -1) { Widget *const w = mModel->getElementAt(row, column); - if ((w != nullptr) && w->isFocusable()) + if (w != nullptr && w->isFocusable()) return w; - else - return nullptr; // Grab the event locally } - else - return nullptr; + return nullptr; } int GuiTable::getRowForY(const int y) const @@ -627,8 +624,7 @@ int GuiTable::getRowForY(const int y) const if (row < 0 || row >= mModel->getRows()) return -1; - else - return row; + return row; } int GuiTable::getColumnForX(const int x) const @@ -646,8 +642,7 @@ int GuiTable::getColumnForX(const int x) const if (column < 0 || column >= colnum) return -1; - else - return column; + return column; } void GuiTable::setFocusHandler(FocusHandler *const focusHandler) -- cgit v1.2.3-60-g2f50