[MPlayer-cvslog] r33053 - trunk/gui/mplayer/gui_common.c

ib subversion at mplayerhq.hu
Tue Mar 8 14:03:22 CET 2011


Author: ib
Date: Tue Mar  8 14:03:22 2011
New Revision: 33053

Log:
Replace ternary operator by more intelligible switch statement.

Modified:
   trunk/gui/mplayer/gui_common.c

Modified: trunk/gui/mplayer/gui_common.c
==============================================================================
--- trunk/gui/mplayer/gui_common.c	Tue Mar  8 13:50:52 2011	(r33052)
+++ trunk/gui/mplayer/gui_common.c	Tue Mar  8 14:03:22 2011	(r33053)
@@ -387,7 +387,20 @@ void Render(wsTWindow *window, wItem *It
 
     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:


More information about the MPlayer-cvslog mailing list