From 27f527bb45de9ab3c6eaf4d6f60b28a08ce40b74 Mon Sep 17 00:00:00 2001 From: Thilo Graf Date: Sun, 21 Aug 2016 14:22:08 +0200 Subject: [PATCH] CComponentsWindow: simplify statements Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/ca5702acf4b3ccb52bf5944206e89c06abe64a72 Author: Thilo Graf Date: 2016-08-21 (Sun, 21 Aug 2016) --- src/gui/components/cc_frm_window.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/gui/components/cc_frm_window.cpp b/src/gui/components/cc_frm_window.cpp index e808e28b1..a3a5ba43e 100644 --- a/src/gui/components/cc_frm_window.cpp +++ b/src/gui/components/cc_frm_window.cpp @@ -168,14 +168,10 @@ void CComponentsWindow::initWindowSize() if (cc_parent) return; - if (width == 0) - width = frameBuffer->getScreenWidth(); - else if ((unsigned)width > frameBuffer->getScreenWidth()) + if (width == 0 || (unsigned)width > frameBuffer->getScreenWidth()) width = frameBuffer->getScreenWidth(); - if (height == 0) - height = frameBuffer->getScreenHeight(); - else if((unsigned)height > frameBuffer->getScreenHeight()) + if (height == 0 || (unsigned)height > frameBuffer->getScreenHeight()) height = frameBuffer->getScreenHeight(); }