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
This commit is contained in:
Stefano Ceccherini 2010-07-09 19:53:58 +00:00
parent c445fa21e6
commit 9b74142851

View File

@ -2749,9 +2749,9 @@ BMenu::_AddDynamicItems(bool keyDown)
{ {
bool addAborted = false; bool addAborted = false;
if (AddDynamicItem(B_INITIAL_ADD)) { if (AddDynamicItem(B_INITIAL_ADD)) {
BMenuItem* superItem = Superitem();
BMenu* superMenu = Supermenu();
do { do {
BMenuItem* superItem = Superitem();
BMenu* superMenu = Supermenu();
if (superMenu != NULL if (superMenu != NULL
&& !superMenu->_OkToProceed(superItem, keyDown)) { && !superMenu->_OkToProceed(superItem, keyDown)) {
AddDynamicItem(B_ABORT); AddDynamicItem(B_ABORT);