Enlightenment CVS committal

Author  : barbieri
Project : e17
Module  : libs/evas

Dir     : e17/libs/evas/src/lib/engines/common


Modified Files:
        evas_convert_main.c 


Log Message:
Cosmetic: use correct size for comparison of pointers.

Due the comparions, the code worked fine, but use the correct type
size so it's cleaner.

By: Brett Nash (compare-whole-pointer.patch)

===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_convert_main.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- evas_convert_main.c 2 Mar 2007 14:51:16 -0000       1.8
+++ evas_convert_main.c 13 Sep 2007 14:19:30 -0000      1.9
@@ -202,7 +202,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT0
                  if (rotation == 0)
                    {
-                      if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+                      if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
                         return evas_common_convert_rgba2_to_16bpp_rgb_565_dith;
                       else
                         return evas_common_convert_rgba_to_16bpp_rgb_565_dith;
@@ -211,7 +211,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT180
                  if (rotation == 180)
                    {
-                      if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+                      if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
                         return 
evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_180;
                       else
                         return 
evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_180;
@@ -220,7 +220,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT270
                  if (rotation == 270)
                    {
-                      if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+                      if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
                         return 
evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_270;
                       else
                         return 
evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_270;
@@ -229,7 +229,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT90
                  if (rotation == 90)
                    {
-                      if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+                      if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
                         return 
evas_common_convert_rgba2_to_16bpp_rgb_565_dith_rot_90;
                       else
                         return 
evas_common_convert_rgba_to_16bpp_rgb_565_dith_rot_90;
@@ -243,7 +243,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT0
                  if (rotation == 0)
                    {
-                      if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+                      if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
                         return evas_common_convert_rgba2_to_16bpp_bgr_565_dith;
                       else
                         return evas_common_convert_rgba_to_16bpp_bgr_565_dith;
@@ -252,7 +252,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT180
                  if (rotation == 180)
                    {
-                      if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+                      if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
                         return 
evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_180;
                       else
                         return 
evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_180;
@@ -261,7 +261,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT270
                  if (rotation == 270)
                    {
-                      if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+                      if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
                         return 
evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_270;
                       else
                         return 
evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_270;
@@ -270,7 +270,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT90
                  if (rotation == 90)
                    {
-                      if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+                      if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
                         return 
evas_common_convert_rgba2_to_16bpp_bgr_565_dith_rot_90;
                       else
                         return 
evas_common_convert_rgba_to_16bpp_bgr_565_dith_rot_90;
@@ -284,7 +284,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT0
                  if (rotation == 0)
                    {
-                      if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+                      if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
                         return evas_common_convert_rgba2_to_16bpp_rgb_555_dith;
                       else
                         return evas_common_convert_rgba_to_16bpp_rgb_555_dith;
@@ -293,7 +293,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT180
                  if (rotation == 180)
                    {
-                      if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+                      if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
                         return 
evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_180;
                       else
                         return 
evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_180;
@@ -302,7 +302,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT270
                  if (rotation == 270)
                    {
-                      if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+                      if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
                         return 
evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_270;
                       else
                         return 
evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_270;
@@ -311,7 +311,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT90
                  if (rotation == 90)
                    {
-                      if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+                      if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
                         return 
evas_common_convert_rgba2_to_16bpp_rgb_555_dith_rot_90;
                       else
                         return 
evas_common_convert_rgba_to_16bpp_rgb_555_dith_rot_90;
@@ -325,7 +325,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT0
                  if (rotation == 0)
                    {
-                      if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+                      if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
                         return evas_common_convert_rgba2_to_16bpp_rgb_444_dith;
                       else
                         return evas_common_convert_rgba_to_16bpp_rgb_444_dith;
@@ -334,7 +334,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT180
                  if (rotation == 180)
                    {
-                      if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+                      if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
                         return 
evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_180;
                       else
                         return 
evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_180;
@@ -343,7 +343,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT270
                  if (rotation == 270)
                    {
-                      if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+                      if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
                         return 
evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_270;
                       else
                         return 
evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_270;
@@ -352,7 +352,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT90
                  if (rotation == 90)
                    {
-                      if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+                      if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
                         return 
evas_common_convert_rgba2_to_16bpp_rgb_444_dith_rot_90;
                       else
                         return 
evas_common_convert_rgba_to_16bpp_rgb_444_dith_rot_90;
@@ -366,7 +366,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT0
                  if (rotation == 0)
                    {
-                      if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+                      if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
                         return 
evas_common_convert_rgba2_to_16bpp_rgb_454645_dith;
                       else
                         return 
evas_common_convert_rgba_to_16bpp_rgb_454645_dith;
@@ -376,7 +376,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT180
                  if (rotation == 180)
                    {
-                      if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+                      if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
                         return 
evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180;
                       else
                         return 
evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180;
@@ -385,7 +385,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT270
                  if (rotation == 270)
                    {
-                      if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+                      if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
                         return 
evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270;
                       else
                         return 
evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270;
@@ -394,7 +394,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT90
                  if (rotation == 270)
                    {
-                      if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+                      if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
                         return 
evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90;
                       else
                         return 
evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90;
@@ -408,7 +408,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT0
                  if (rotation == 0)
                    {
-                      if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+                      if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
                         return 
evas_common_convert_rgba2_to_16bpp_rgb_454645_dith;
                       else
                         return 
evas_common_convert_rgba_to_16bpp_rgb_454645_dith;
@@ -418,7 +418,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT180
                  if (rotation == 180)
                    {
-                      if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+                      if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
                         return 
evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_180;
                       else
                         return 
evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_180;
@@ -427,7 +427,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT270
                  if (rotation == 270)
                    {
-                      if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+                      if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
                         return 
evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_270;
                       else
                         return 
evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_270;
@@ -436,7 +436,7 @@
 #ifdef BUILD_CONVERT_16_RGB_ROT90
                  if (rotation == 90)
                    {
-                      if ((!(w & 0x1)) && (!((int)dest & 0x3)))
+                      if ((!(w & 0x1)) && (!((intptr_t)dest & 0x3)))
                         return 
evas_common_convert_rgba2_to_16bpp_rgb_454645_dith_rot_90;
                       else
                         return 
evas_common_convert_rgba_to_16bpp_rgb_454645_dith_rot_90;



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to