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:
committed by
Adrien Destugues
parent
6467297a1b
commit
efc042ff48
@@ -1234,7 +1234,7 @@ FrameMoved(origin);
|
||||
_AdoptResize();
|
||||
FrameResized(width, height);
|
||||
}
|
||||
|
||||
|
||||
// draw
|
||||
int32 count = infos.CountItems();
|
||||
for (int32 i = 0; i < count; i++) {
|
||||
@@ -1517,13 +1517,11 @@ BWindow::SetZoomLimits(float maxWidth, float maxHeight)
|
||||
// TODO: What about locking?!?
|
||||
if (maxWidth > fMaxWidth)
|
||||
maxWidth = fMaxWidth;
|
||||
else
|
||||
fMaxZoomWidth = maxWidth;
|
||||
fMaxZoomWidth = maxWidth;
|
||||
|
||||
if (maxHeight > fMaxHeight)
|
||||
maxHeight = fMaxHeight;
|
||||
else
|
||||
fMaxZoomHeight = maxHeight;
|
||||
fMaxZoomHeight = maxHeight;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user