elm: Defined the same macro, MAX and MIN, in elm_priv.h

MAX and MIN are defined in a couple of places and they was already
defined in elm_priv.h. So use elm_priv.h's one.
I also moved CEIL to elm_priv.h that can be used in another places.
This commit is contained in:
Daniel Juyung Seo 2014-01-23 23:15:39 +09:00
parent b74c805a74
commit 98a08addc4
4 changed files with 3 additions and 20 deletions

View File

@ -14,14 +14,6 @@ EAPI Eo_Op ELM_OBJ_CONFORMANT_BASE_ID = EO_NOOP;
#define MY_CLASS_NAME "Elm_Conformant"
#define MY_CLASS_NAME_LEGACY "elm_conformant"
#ifndef MIN
# define MIN(a, b) ((a) < (b)) ? (a) : (b)
#endif
#ifndef MAX
# define MAX(a, b) ((a) < (b)) ? (b) : (a)
#endif
static char CONFORMANT_KEY[] = "_elm_conform_key";
#define ELM_CONFORM_INDICATOR_TIME 1.0

View File

@ -7,14 +7,6 @@
#include "elm_widget_diskselector.h"
#include "elm_interface_scrollable.h"
#ifndef MAX
# define MAX(a, b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef CEIL
#define CEIL(a) (((a) % 2 != 0) ? ((a) / 2 + 1) : ((a) / 2))
#endif
#define DISPLAY_ITEM_NUM_MIN 3
EAPI Eo_Op ELM_OBJ_DISKSELECTOR_BASE_ID = EO_NOOP;

View File

@ -14,10 +14,6 @@ EAPI Eo_Op ELM_OBJ_HOVER_BASE_ID = EO_NOOP;
#define MY_CLASS_NAME "Elm_Hover"
#define MY_CLASS_NAME_LEGACY "elm_hover"
#ifndef MAX
# define MAX(a, b) (((a) > (b)) ? (a) : (b))
#endif
#define ELM_HOVER_PARTS_FOREACH unsigned int i; \
for (i = 0; i < sizeof(sd->subs) / sizeof(sd->subs[0]); i++)

View File

@ -159,6 +159,9 @@ extern const char *_elm_engines[];
#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))
#define ELM_SAFE_FREE(_h, _fn) do { _fn((void*)_h); _h = NULL; } while (0)