Style fixes to BMenu and related classes.

This commit is contained in:
John Scipione
2013-05-06 17:15:17 -04:00
parent 3f5d1e7825
commit d97b434060
7 changed files with 75 additions and 77 deletions
+6 -6
View File
@@ -733,7 +733,7 @@ BMenu::AddItem(BMenuItem* item, BRect frame)
"be called if the menu layout is B_ITEMS_IN_MATRIX");
}
if (!item)
if (item == NULL)
return false;
item->fBounds = frame;
@@ -758,7 +758,7 @@ bool
BMenu::AddItem(BMenu* submenu)
{
BMenuItem* item = new (nothrow) BMenuItem(submenu);
if (!item)
if (item == NULL)
return false;
if (!AddItem(item, CountItems())) {
@@ -780,7 +780,7 @@ BMenu::AddItem(BMenu* submenu, int32 index)
}
BMenuItem* item = new (nothrow) BMenuItem(submenu);
if (!item)
if (item == NULL)
return false;
if (!AddItem(item, index)) {
@@ -802,7 +802,7 @@ BMenu::AddItem(BMenu* submenu, BRect frame)
}
BMenuItem* item = new (nothrow) BMenuItem(submenu);
if (!item)
if (item == NULL)
return false;
if (!AddItem(item, frame)) {
@@ -2848,7 +2848,8 @@ BMenu::_UpdateWindowViewSize(const bool &move)
return;
bool scroll = false;
const BPoint screenLocation = move ? ScreenLocation() : window->Frame().LeftTop();
const BPoint screenLocation = move ? ScreenLocation()
: window->Frame().LeftTop();
BRect frame = _CalcFrame(screenLocation, &scroll);
ResizeTo(frame.Width(), frame.Height());
@@ -3024,4 +3025,3 @@ B_IF_GCC_2(InvalidateLayout__5BMenub,_ZN5BMenu16InvalidateLayoutEb)(
{
menu->InvalidateLayout();
}