From db11bebffca39db1b31924e86dec92ac0437e2d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sun, 27 Jun 2004 21:36:42 +0000 Subject: [PATCH] Fixed warnings. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@8196 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/MenuField.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/kits/interface/MenuField.cpp b/src/kits/interface/MenuField.cpp index 1bbd846a6f..c7551c5138 100644 --- a/src/kits/interface/MenuField.cpp +++ b/src/kits/interface/MenuField.cpp @@ -25,6 +25,8 @@ //------------------------------------------------------------------------------ // Standard Includes ----------------------------------------------------------- +#include +#include // System Includes ------------------------------------------------------------- #include @@ -255,10 +257,9 @@ void BMenuField::MouseDown(BPoint where) if (where.x > fDivider && !fMenuBar->Frame().Contains(where)) return; - BRect bounds(Bounds()); + BRect bounds = fMenuBar->ConvertFromParent(Bounds()); - fMenuBar->StartMenuBar(0, false, true, - &fMenuBar->ConvertFromParent(bounds)); + fMenuBar->StartMenuBar(0, false, true, &bounds); fMenuTaskID = spawn_thread((thread_func)MenuTask, "_m_task_", B_NORMAL_PRIORITY, this); @@ -275,10 +276,9 @@ void BMenuField::KeyDown(const char *bytes, int32 numBytes) case B_RIGHT_ARROW: case B_DOWN_ARROW: { - BRect bounds(Bounds()); + BRect bounds = fMenuBar->ConvertFromParent(Bounds()); - fMenuBar->StartMenuBar(0, true, true, - &fMenuBar->ConvertFromParent(bounds)); + fMenuBar->StartMenuBar(0, true, true, &bounds); fSelected = true; fTransition = true; @@ -547,7 +547,7 @@ void BMenuField::InitMenu(BMenu *menu) int32 index = 0; BMenu *subMenu; - while (subMenu = menu->SubmenuAt(index++)) + while ((subMenu = menu->SubmenuAt(index++)) != NULL) InitMenu(subMenu); } //------------------------------------------------------------------------------