Commit d1bdcc92 authored by Kurt Hindenburg's avatar Kurt Hindenburg

simplify if()s for readability

parent 068b2af4
......@@ -684,7 +684,7 @@ void Session::updateTerminalSize()
//select largest number of lines and columns that will fit in all visible views
foreach(TerminalDisplay* view, _views) {
if (view->isHidden() == false &&
if (!view->isHidden() &&
view->lines() >= VIEW_LINES_THRESHOLD &&
view->columns() >= VIEW_COLUMNS_THRESHOLD) {
minLines = (minLines == -1) ? view->lines() : qMin(minLines , view->lines());
......@@ -756,10 +756,7 @@ bool Session::kill(int signal)
int result = ::kill(_shellProcess->pid(), signal);
if (result == 0) {
if (_shellProcess->waitForFinished(1000))
return true;
else
return false;
return _shellProcess->waitForFinished(1000);
} else {
return false;
}
......
......@@ -235,10 +235,7 @@ bool ViewContainerTabBar::proposedDropIsSameTab(const QDropEvent* event) const
emit querySourceIndex(event, sourceIndex);
const bool sourceAndDropAreLast = sourceIndex == count() - 1 && index == -1;
if (sourceIndex == index || sourceIndex == index - 1 || sourceAndDropAreLast)
return true;
else
return false;
return sourceIndex == index || sourceIndex == index - 1 || sourceAndDropAreLast;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment