Fix style.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@39269 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Philippe Houdoin
2010-11-02 11:31:01 +00:00
parent aede543994
commit 6fd9d3d930
@@ -298,7 +298,7 @@ TeamsListView::_InitList()
while (get_next_team_info(&tmi_cookie, &tmi) == B_OK) { while (get_next_team_info(&tmi_cookie, &tmi) == B_OK) {
TeamListItem* item = new(std::nothrow) TeamListItem(tmi); TeamListItem* item = new(std::nothrow) TeamListItem(tmi);
if (!item) { if (item == NULL) {
// Memory issue. Bail out. // Memory issue. Bail out.
break; break;
} }
@@ -336,15 +336,16 @@ TeamsListView::_UpdateList()
item = (TeamListItem*) ItemAt(index); item = (TeamListItem*) ItemAt(index);
} }
if (!item || tmi.team != item->TeamID()) { if (item == NULL || tmi.team != item->TeamID()) {
// Team not found in previously known teams list: insert a new item // Team not found in previously known teams list: insert a new item
TeamListItem* newItem = new(std::nothrow) TeamListItem(tmi); TeamListItem* newItem = new(std::nothrow) TeamListItem(tmi);
if (newItem != NULL) { if (newItem != NULL) {
bool added; bool added;
if (!item) // No item found with bigger team id: append at end if (item == NULL) {
// No item found with bigger team id: append at list end
added = AddItem(newItem); added = AddItem(newItem);
else } else
added = AddItem(newItem, index); added = AddItem(newItem, index);
if (!added) { if (!added) {