CComponentsWindow: simplify statements

Origin commit data
------------------
Branch: ni/coolstream
Commit: ca5702acf4
Author: Thilo Graf <dbt@novatux.de>
Date: 2016-08-21 (Sun, 21 Aug 2016)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
2016-08-21 14:22:08 +02:00
parent a593f3eec3
commit 78b38c9d31

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