LAB: Verify the appropriate use of parenthesis in if statements
This commit is contained in:
parent
83126e84ee
commit
5ed11d721c
8 changed files with 13 additions and 13 deletions
|
@ -117,8 +117,8 @@ Button *EventManager::checkNumButtonHit(ButtonList *buttonList, uint16 key) {
|
|||
|
||||
for (ButtonList::iterator buttonItr = buttonList->begin(); buttonItr != buttonList->end(); ++buttonItr) {
|
||||
Button *button = *buttonItr;
|
||||
if ((gkey - 1 == button->_buttonID || (gkey == 0 && button->_buttonID == 9) ||
|
||||
(button->_keyEquiv != 0 && makeButtonKeyEquiv(key) == button->_keyEquiv))
|
||||
if (((gkey - 1 == button->_buttonID) || ((gkey == 0) && (button->_buttonID == 9))
|
||||
|| ((button->_keyEquiv != 0) && (makeButtonKeyEquiv(key) == button->_keyEquiv)))
|
||||
&& button->_isEnabled) {
|
||||
mouseHide();
|
||||
button->_altImage->drawImage(button->_x, button->_y);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue