Mercurial > mplayer.hg
changeset 32966:1f51f39916e1
Replace ternary operator by more intelligible switch statement.
author | ib |
---|---|
date | Tue, 08 Mar 2011 13:03:22 +0000 |
parents | 3242637f94b6 |
children | d9363dbd3f83 |
files | gui/mplayer/gui_common.c |
diffstat | 1 files changed, 14 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/gui/mplayer/gui_common.c Tue Mar 08 12:50:52 2011 +0000 +++ b/gui/mplayer/gui_common.c Tue Mar 08 13:03:22 2011 +0000 @@ -387,7 +387,20 @@ for (i = 0; i < nrItems + 1; i++) { item = &Items[i]; - ofs = (item->pressed == btnPressed ? 0 : (item->pressed == btnReleased ? 1 : 2)); + + switch (item->pressed) { + case btnPressed: + ofs = 0; + break; + + case btnReleased: + ofs = 1; + break; + + default: + ofs = 2; + break; + } switch (item->type) { case itButton: