Permalink
Browse files

(forceClose ? 0x01 : 0 | enableSound ? 0x02 : 0);

is actually (forceClose ? 0x01 : (0 | enableSound) ? 0x02 : 0); based on operator precedence of bit-wise or.
  • Loading branch information...
1 parent 4542cb5 commit b2abab5de257fda8650bf165d34bd99305742e6b Mike committed Jul 25, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 xbmc/ApplicationMessenger.cpp
@@ -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);
}

0 comments on commit b2abab5

Please sign in to comment.