[haiku-commits] r37445 - haiku/trunk/src/kits/interface

Author: jackburton
Date: 2010-07-09 21:53:58 +0200 (Fri, 09 Jul 2010)
New Revision: 37445
Changeset: http://dev.haiku-os.org/changeset/37445/haiku

Modified:
   haiku/trunk/src/kits/interface/Menu.cpp
Log:
Move assigments a bit earlier, so they aren't done at every loop.
Thanks to Sean Bailey for watching after me.


Modified: haiku/trunk/src/kits/interface/Menu.cpp
===================================================================
--- haiku/trunk/src/kits/interface/Menu.cpp     2010-07-09 17:53:49 UTC (rev 
37444)
+++ haiku/trunk/src/kits/interface/Menu.cpp     2010-07-09 19:53:58 UTC (rev 
37445)
@@ -2749,9 +2749,9 @@
 {
        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);


Other related posts:

  • » [haiku-commits] r37445 - haiku/trunk/src/kits/interface - stefano . ceccherini