changeset 29589:5ed139ad6dfd

Cosmetics: get rid of many pointless ()
author reimar
date Wed, 02 Sep 2009 14:11:30 +0000
parents 17d7ae586d03
children ee385ab885b2
files libvo/vo_quartz.c
diffstat 1 files changed, 17 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/libvo/vo_quartz.c	Wed Sep 02 14:02:15 2009 +0000
+++ b/libvo/vo_quartz.c	Wed Sep 02 14:11:30 2009 +0000
@@ -300,7 +300,7 @@
                 }
                 break;
             }
-            if ((winMousePos.h > (bounds.right - 15)) && (winMousePos.v > (bounds.bottom)))
+            if (winMousePos.h > bounds.right - 15 && winMousePos.v > bounds.bottom)
             {
                 if (!vo_quartz_fs)
                 {
@@ -355,7 +355,7 @@
 
     if (vo_quartz_fs)
     {
-        vo_fs = (!(vo_fs));
+        vo_fs = !vo_fs;
         window_fullscreen();
     }
 
@@ -398,12 +398,12 @@
             break;
 
         case kFullScreenCmd:
-            vo_fs = (!(vo_fs));
+            vo_fs = !vo_fs;
             window_fullscreen();
             break;
 
         case kKeepAspectCmd:
-            vo_keepaspect = (!(vo_keepaspect));
+            vo_keepaspect = !vo_keepaspect;
             CheckMenuItem(aspectMenu, 1, vo_keepaspect);
             window_resized();
             break;
@@ -421,7 +421,7 @@
             break;
 
         case kPanScanCmd:
-            vo_panscan = (!(vo_panscan));
+            vo_panscan = !vo_panscan;
             CheckMenuItem(aspectMenu, 2, vo_panscan);
             window_panscan();
             window_resized();
@@ -635,7 +635,7 @@
         image_depth = 16;
         break;
     }
-    image_size = ((imgRect.right * imgRect.bottom * image_depth) + 7) / 8;
+    image_size = (imgRect.right * imgRect.bottom * image_depth + 7) / 8;
 
     image_data = malloc(image_size);
 
@@ -644,7 +644,7 @@
                 | kWindowStandardHandlerAttribute
                 | kWindowLiveResizeAttribute;
 
-    windowAttrs &= (~kWindowResizableAttribute);
+    windowAttrs &= ~kWindowResizableAttribute;
 
     if (theWindow == NULL)
     {
@@ -685,7 +685,7 @@
                               imgRect.bottom,
                               8,
                               image_depth,
-                              ((imgRect.right * 32) + 7) / 8,
+                              (imgRect.right * 32 + 7) / 8,
                               CGColorSpaceCreateDeviceRGB(),
                               kCGImageAlphaNoneSkipFirst,
                               dataProviderRef, 0, 1, kCGRenderingIntentDefault);
@@ -719,7 +719,7 @@
 
         SetIdentityMatrix(&matrix);
 
-        if ((d_width != width) || (d_height != height))
+        if (d_width != width || d_height != height)
         {
             ScaleMatrix(&matrix, FixDiv(Long2Fix(d_width), Long2Fix(width)), FixDiv(Long2Fix(d_height), Long2Fix(height)), 0, 0);
         }
@@ -816,7 +816,7 @@
                                          GetWindowPort(theWindow),
                                          NULL,
                                          NULL,
-                                         ((d_width != width) || (d_height != height)) ?
+                                         d_width != width || d_height != height ?
                                          &matrix : NULL,
                                          srcCopy,
                                          NULL,
@@ -962,7 +962,7 @@
     // auto hide mouse cursor (and future on-screen control?)
     if (vo_quartz_fs && !mouseHide)
     {
-        if (((curTime - lastMouseHide) >= 5) || (lastMouseHide == 0))
+        if (curTime - lastMouseHide >= 5 || lastMouseHide == 0)
         {
             CGDisplayHideCursor(displayId);
             mouseHide = TRUE;
@@ -971,7 +971,7 @@
     }
     // update activity every 30 seconds to prevent
     // screensaver from starting up.
-    if (((curTime - lastScreensaverUpdate) >= 30) || (lastScreensaverUpdate == 0))
+    if (curTime - lastScreensaverUpdate >= 30 || lastScreensaverUpdate == 0)
     {
         UpdateSystemActivity(UsrActivity);
         lastScreensaverUpdate = curTime;
@@ -1028,7 +1028,7 @@
         return VFCAP_CSP_SUPPORTED | VFCAP_OSD | VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN;
     }
 
-    if ((format == IMGFMT_YV12) || (format == IMGFMT_IYUV) || (format == IMGFMT_I420))
+    if (format == IMGFMT_YV12 || format == IMGFMT_IYUV || format == IMGFMT_I420)
     {
         image_qtcodec = kMpegYUV420CodecType;   //kYUV420CodecType ?;
         return VFCAP_CSP_SUPPORTED | VFCAP_OSD | VFCAP_HWSCALE_UP | VFCAP_HWSCALE_DOWN | VFCAP_ACCEPT_STRIDE;
@@ -1185,9 +1185,9 @@
     {
     case VOCTRL_PAUSE:        return int_pause = 1;
     case VOCTRL_RESUME:       return int_pause = 0;
-    case VOCTRL_FULLSCREEN:   vo_fs = (!(vo_fs));        window_fullscreen(); return VO_TRUE;
-    case VOCTRL_ONTOP:        vo_ontop = (!(vo_ontop));  window_ontop();      return VO_TRUE;
-    case VOCTRL_QUERY_FORMAT: return query_format(*((uint32_t *) data));
+    case VOCTRL_FULLSCREEN:   vo_fs = !vo_fs;        window_fullscreen(); return VO_TRUE;
+    case VOCTRL_ONTOP:        vo_ontop = !vo_ontop;  window_ontop();      return VO_TRUE;
+    case VOCTRL_QUERY_FORMAT: return query_format(*(uint32_t *) data);
     case VOCTRL_GET_PANSCAN:  return VO_TRUE;
     case VOCTRL_SET_PANSCAN:  window_panscan();          return VO_TRUE;
 
@@ -1258,7 +1258,7 @@
         long scale_Y = FixDiv(Long2Fix(dstRect.bottom - dstRect.top), Long2Fix(imgRect.bottom));
 
         SetIdentityMatrix(&matrix);
-        if (((dstRect.right - dstRect.left) != imgRect.right) || ((dstRect.bottom - dstRect.right) != imgRect.bottom))
+        if (dstRect.right - dstRect.left != imgRect.right || dstRect.bottom - dstRect.right != imgRect.bottom)
         {
             ScaleMatrix(&matrix, scale_X, scale_Y, 0, 0);