Menu: Silly code optimization
Always set releasedOnce to true here instead of setting it true in the case that it is false. It's almost certainly faster and clearer to always do the assignment than to incur the cost of the conditional and branch.
This commit is contained in:
@@ -1685,8 +1685,7 @@ BMenu::_Track(int* action, long start)
|
||||
} else if ((item = _HitTestItems(location, B_ORIGIN)) != NULL) {
|
||||
_UpdateStateOpenSelect(item, location, navAreaRectAbove,
|
||||
navAreaRectBelow, selectedTime, navigationAreaTime);
|
||||
if (!releasedOnce)
|
||||
releasedOnce = true;
|
||||
releasedOnce = true;
|
||||
} else if (_OverSuper(screenLocation) && fSuper->fState != MENU_STATE_KEY_TO_SUBMENU) {
|
||||
fState = MENU_STATE_TRACKING;
|
||||
UnlockLooper();
|
||||
|
||||
Reference in New Issue
Block a user