efl: everyone should now rely on Eina MIN/MAX redefinition.
authorCedric BAIL <cedric@osg.samsung.com>
Mon, 9 May 2016 23:58:31 +0000 (16:58 -0700)
committerCedric BAIL <cedric@osg.samsung.com>
Mon, 9 May 2016 23:58:53 +0000 (16:58 -0700)
16 files changed:
src/examples/evas/shooter/evas-3d-shooter-macros.h
src/lib/ecore/ecore_private.h
src/lib/ecore_win32/ecore_win32_private.h
src/lib/ecore_x/xcb/ecore_xcb_dnd.c
src/lib/ecore_x/xcb/ecore_xcb_private.h
src/lib/edje/edje_private.h
src/lib/eet/eet_image.c
src/lib/eina/eina_private.h
src/lib/eina/eina_str.c
src/lib/eina/eina_tiler.c
src/lib/elementary/elm_priv.h
src/lib/evas/canvas/render2/region.c
src/lib/evas/include/evas_macros.h
src/modules/evas/image_loaders/gif/evas_image_load_gif.c
src/static_libs/rg_etc/rg_etc1.c
src/static_libs/rg_etc/rg_etc2.c

index ce23acf..d7f2186 100644 (file)
@@ -1,6 +1,3 @@
-#define MAX(x, y) (((x) > (y)) ? (x) : (y))
-#define MIN(x, y) (((x) < (y)) ? (x) : (y))
-
 #define  FOG_COLOR        0.5, 0.5, 0.5
 #define  FOG_FACTOR       0.01
 #define  WIDTH            1920
index c95a4d9..062c8a2 100644 (file)
@@ -69,14 +69,6 @@ extern int _ecore_log_dom;
 # define PATH_MAX 4096
 #endif
 
-#ifndef MIN
-# define MIN(x, y)          (((x) > (y)) ? (y) : (x))
-#endif
-
-#ifndef MAX
-# define MAX(x, y)          (((x) > (y)) ? (x) : (y))
-#endif
-
 #ifndef ABS
 # define ABS(x)             ((x) < 0 ? -(x) : (x))
 #endif
index b5a805a..c90674f 100644 (file)
@@ -6,16 +6,6 @@
 extern "C" {
 #endif
 
-#ifdef MIN
-# undef MIN
-#endif
-#define MIN(a,b) (((a) < (b)) ? (a) : (b))
-
-#ifdef MAX
-# undef MAX
-#endif
-#define MAX(a,b) (((a) < (b)) ? (b) : (a))
-
 /* logging messages macros */
 extern int _ecore_win32_log_dom_global;
 
index 07eae1f..974ec0e 100644 (file)
@@ -1,9 +1,5 @@
 #include "ecore_xcb_private.h"
 
-#ifndef MIN
-# define MIN(a, b) (((a) < (b)) ? (a) : (b))
-#endif
-
 /* local structures */
 typedef struct _Version_Cache_Item
 {
index 61452f2..d6bb743 100644 (file)
@@ -73,14 +73,6 @@ extern int _ecore_xcb_log_dom;
 #  define MAXHOSTNAMELEN 256
 # endif
 
-# ifndef MIN
-#  define MIN(x, y) (((x) > (y)) ? (y) : (x))
-# endif
-
-# ifndef MAX
-#  define MAX(a, b) ((a < b) ? b : a)
-# endif
-
 #define CHECK_XCB_CONN                              \
   {                                                 \
      if (xcb_connection_has_error(_ecore_xcb_conn)) \
index 92148e8..5bfecbc 100644 (file)
@@ -130,10 +130,6 @@ EAPI extern int _edje_default_log_dom ;
 #define CLAMP(x, min, max) (((x) > (max)) ? (max) : (((x) < (min)) ? (min) : (x)))
 #endif
 
-#ifndef MIN
-#define MIN(a, b) (((a) < (b)) ? (a) : (b))
-#endif
-
 
 #ifdef BUILD_EDJE_FP
 
index 5578925..ba43c20 100644 (file)
 #define OFFSET_HEIGHT 12
 #define OFFSET_BLOCKS 16
 
-#undef MIN
-#define MIN(x, y) (((x) < (y)) ? (x) : (y))
-
-#undef MAX
-#define MAX(x, y) (((x) > (y)) ? (x) : (y))
-
 /*---*/
 
 typedef struct _JPEG_error_mgr *emptr;
index c51d35f..810e4b2 100644 (file)
 #include "eina_iterator.h"
 #include "eina_accessor.h"
 
-#ifndef MIN
-# define MIN(x, y) (((x) > (y)) ? (y) : (x))
-#endif
-
-#ifndef MAX
-# define MAX(x, y) (((x) > (y)) ? (x) : (y))
-#endif
-
 #ifndef ABS
 # define ABS(x) ((x) < 0 ? -(x) : (x))
 #endif
index 837d61b..dcf93c3 100644 (file)
@@ -35,7 +35,7 @@
 
 #include "eina_private.h"
 #include "eina_str.h"
-
+#include "eina_cpu.h"
 
 /*============================================================================*
 *                                  Local                                     *
index 5661a1b..e8abcdc 100644 (file)
@@ -33,6 +33,7 @@
 #include "eina_config.h"
 #include "eina_private.h"
 #include "eina_tiler.h"
+#include "eina_cpu.h"
 
 /*============================================================================*
 *                                  Local                                     *
index 101f398..90789bb 100644 (file)
@@ -169,10 +169,6 @@ extern const char *_elm_engines[];
 #define ELM_ATSPI_MODE_ON    EINA_TRUE
 
 /* convenience macro to compress code and avoid typos */
-#undef MIN
-#define MIN(x, y) (((x) < (y)) ? (x) : (y))
-#undef MAX
-#define MAX(x, y) (((x) > (y)) ? (x) : (y))
 #undef CEIL
 #define CEIL(a)   (((a) % 2 != 0) ? ((a) / 2 + 1) : ((a) / 2))
 #undef IS_INSIDE
index 286df40..d6974e3 100644 (file)
@@ -84,13 +84,6 @@ struct _Region
 #define PIXREGION_END(reg)       PIXREGION_BOX(reg, (reg)->data->num - 1)
 #define PIXREGION_SZOF(n)        (sizeof(Region_Data) + ((n) * sizeof(Box)))
 
-#ifndef MIN
-# define MIN(a, b) ((a) < (b) ? (a) : (b))
-#endif
-#ifndef MAX
-# define MAX(a, b) ((a) > (b) ? (a) : (b))
-#endif
-
 // r1 and r2 overlap
 #define OVERLAP(r1, r2) \
    (!(((r1)->x2 <= (r2)->x1) || ((r1)->x1 >= (r2)->x2)  || \
index c3bc339..1deefb8 100644 (file)
@@ -7,12 +7,6 @@
 #undef SGN
 #define SGN(x) (((x) < 0) ? -1 : 1)
 
-#undef MIN
-#define MIN(x, y) (((x) < (y)) ? (x) : (y))
-
-#undef MAX
-#define MAX(x, y) (((x) > (y)) ? (x) : (y))
-
 /* clamp b between a and c */
 #undef CLAMP
 #define CLAMP(a,b,c) MIN(MAX((b),(a)),(c))
index ac40352..f20b8cc 100644 (file)
@@ -37,9 +37,6 @@ struct _Frame_Info
    Eina_Bool interlace : 1; // interlaced or not
 };
 
-#ifndef MIN
-# define MIN(a, b) (((a) < (b)) ? (a) : (b))
-#endif
 #define LOADERR(x) \
 do { \
    *error = (x); \
index 8663167..cff0094 100644 (file)
@@ -33,8 +33,12 @@ typedef unsigned int uint;
 typedef unsigned int uint32;
 typedef unsigned char DATA8;
 
-#define MIN(A, B) ((A < B) ? A : B)
-#define MAX(A, B) ((A > B) ? A : B)
+#ifndef MIN
+# define MIN(A, B) ((A < B) ? A : B)
+#endif
+#ifndef MAX
+# define MAX(A, B) ((A > B) ? A : B)
+#endif
 #define CLAMP(Value, Low, High) ((Value < Low) ? Low : ((Value > High) ? High : Value))
 #define SQUARE(Value) (Value * Value)
 
index c0c22ea..e8a465f 100644 (file)
@@ -92,7 +92,9 @@ static const int kAlphaModifiers[16][8] = {
 #define CLAMP(a) ({ int _b = (a); (((_b) >= 0) ? (((_b) < 256) ? (_b) : 255) : 0); })
 
 // Simple min
-#define MIN(a,b) ({ int _z = (a), _y = (b); ((_z <= _y) ? _z : _y); })
+#ifndef MIN
+# define MIN(a,b) ({ int _z = (a), _y = (b); ((_z <= _y) ? _z : _y); })
+#endif
 
 // Write a BGRA value for output to Evas
 #define BGRA(r,g,b,a) ((a << 24) | (r << 16) | (g << 8) | b)