Fix incorrect initialization of boolean in BGridLayout::ItemRemoved() that lead to unreachable code, fixes CID 58.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37966 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -580,7 +580,7 @@ BGridLayout::ItemRemoved(BLayoutItem* item, int32 fromIndex)
|
|||||||
int32 rowCount = fRowCount;
|
int32 rowCount = fRowCount;
|
||||||
|
|
||||||
// check for empty columns
|
// check for empty columns
|
||||||
bool empty = false;
|
bool empty = true;
|
||||||
for (; columnCount > 0; columnCount--) {
|
for (; columnCount > 0; columnCount--) {
|
||||||
for (int32 row = 0; empty && row < rowCount; row++)
|
for (int32 row = 0; empty && row < rowCount; row++)
|
||||||
empty &= (fGrid[columnCount - 1][row] == NULL);
|
empty &= (fGrid[columnCount - 1][row] == NULL);
|
||||||
@@ -590,7 +590,7 @@ BGridLayout::ItemRemoved(BLayoutItem* item, int32 fromIndex)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// check for empty rows
|
// check for empty rows
|
||||||
empty = false;
|
empty = true;
|
||||||
for (; rowCount > 0; rowCount--) {
|
for (; rowCount > 0; rowCount--) {
|
||||||
for (int32 column = 0; empty && column < columnCount; column++)
|
for (int32 column = 0; empty && column < columnCount; column++)
|
||||||
empty &= (fGrid[column][rowCount - 1] == NULL);
|
empty &= (fGrid[column][rowCount - 1] == NULL);
|
||||||
|
|||||||
Reference in New Issue
Block a user