Skip to content

Commit

Permalink
(forceClose ? 0x01 : 0 | enableSound ? 0x02 : 0);
Browse files Browse the repository at this point in the history
is actually (forceClose ? 0x01 : (0 | enableSound) ? 0x02 : 0); based on operator precedence of bit-wise or.
  • Loading branch information
Mike committed Jul 25, 2012
1 parent 4542cb5 commit b2abab5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion xbmc/ApplicationMessenger.cpp
Expand Up @@ -1142,7 +1142,7 @@ void CApplicationMessenger::Show(CGUIDialog *pDialog)
void CApplicationMessenger::Close(CGUIWindow *window, bool forceClose, bool waitResult /*= true*/, int nextWindowID /*= 0*/, bool enableSound /*= true*/)
{
ThreadMessage tMsg = {TMSG_GUI_WINDOW_CLOSE, nextWindowID};
tMsg.dwParam2 = (DWORD)(forceClose ? 0x01 : 0 | enableSound ? 0x02 : 0);
tMsg.dwParam2 = (DWORD)((forceClose ? 0x01 : 0) | (enableSound ? 0x02 : 0));
tMsg.lpVoid = window;
SendMessage(tMsg, waitResult);
}
Expand Down

0 comments on commit b2abab5

Please sign in to comment.