CComponentsWindow: simplify statements

This commit is contained in:
2016-08-21 14:22:08 +02:00
parent a92757697f
commit ca5702acf4

View File

@@ -168,14 +168,10 @@ void CComponentsWindow::initWindowSize()
if (cc_parent) if (cc_parent)
return; return;
if (width == 0) if (width == 0 || (unsigned)width > frameBuffer->getScreenWidth())
width = frameBuffer->getScreenWidth();
else if ((unsigned)width > frameBuffer->getScreenWidth())
width = frameBuffer->getScreenWidth(); width = frameBuffer->getScreenWidth();
if (height == 0) if (height == 0 || (unsigned)height > frameBuffer->getScreenHeight())
height = frameBuffer->getScreenHeight();
else if((unsigned)height > frameBuffer->getScreenHeight())
height = frameBuffer->getScreenHeight(); height = frameBuffer->getScreenHeight();
} }