From 9b7414285160d737e02637cbe3769f93bc350abd Mon Sep 17 00:00:00 2001 From: Stefano Ceccherini Date: Fri, 9 Jul 2010 19:53:58 +0000 Subject: [PATCH] Move assigments a bit earlier, so they aren't done at every loop. Thanks to Sean Bailey for watching after me. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37445 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/Menu.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kits/interface/Menu.cpp b/src/kits/interface/Menu.cpp index 14060d2d3e..c5f6ecdd13 100644 --- a/src/kits/interface/Menu.cpp +++ b/src/kits/interface/Menu.cpp @@ -2749,9 +2749,9 @@ BMenu::_AddDynamicItems(bool keyDown) { bool addAborted = false; if (AddDynamicItem(B_INITIAL_ADD)) { + BMenuItem* superItem = Superitem(); + BMenu* superMenu = Supermenu(); do { - BMenuItem* superItem = Superitem(); - BMenu* superMenu = Supermenu(); if (superMenu != NULL && !superMenu->_OkToProceed(superItem, keyDown)) { AddDynamicItem(B_ABORT);