Window: Fix dead assignment

Fix value stored to 'maxWidth' or 'maxHeight' is never read
when maxWidth > fMaxWidth or maxHeight > fMaxHeight.
Pointed out by Clang Static Analyzer.

Change-Id: I2bd0b8712d47e64298c0f915f24f7f1c87f4362e
Reviewed-on: https://review.haiku-os.org/c/haiku/+/3474
Reviewed-by: Adrien Destugues <[email protected]>
Reviewed-by: Jérôme Duval <[email protected]>
This commit is contained in:
Murai Takashi
2020-12-10 11:40:20 +00:00
committed by Adrien Destugues
parent 6467297a1b
commit efc042ff48
-2
View File
@@ -1517,12 +1517,10 @@ BWindow::SetZoomLimits(float maxWidth, float maxHeight)
// TODO: What about locking?!? // TODO: What about locking?!?
if (maxWidth > fMaxWidth) if (maxWidth > fMaxWidth)
maxWidth = fMaxWidth; maxWidth = fMaxWidth;
else
fMaxZoomWidth = maxWidth; fMaxZoomWidth = maxWidth;
if (maxHeight > fMaxHeight) if (maxHeight > fMaxHeight)
maxHeight = fMaxHeight; maxHeight = fMaxHeight;
else
fMaxZoomHeight = maxHeight; fMaxZoomHeight = maxHeight;
} }