CComponentsWindow: simplify statements

Origin commit data
------------------
Commit: ca5702acf4
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-08-21 (Sun, 21 Aug 2016)
This commit is contained in:
2016-08-21 14:22:08 +02:00
parent cdd40d98b0
commit 27f527bb45

View File

@@ -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();
}