forked from enlightenment/efl
replace UNLIKELY() with EINA_UNLIKELY()
SVN revision: 42354
This commit is contained in:
parent
c88e3887d8
commit
c98bf92366
|
@ -19,11 +19,6 @@
|
|||
#ifndef EINA_INLINE_ARRAY_X_
|
||||
#define EINA_INLINE_ARRAY_X_
|
||||
|
||||
#ifdef __GNUC__
|
||||
# define UNLIKELY(x) __builtin_expect(!!(x), 0)
|
||||
#else
|
||||
# define UNLIKELY(x) (x)
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @cond LOCAL
|
||||
|
@ -62,7 +57,7 @@ eina_array_push(Eina_Array *array, const void *data)
|
|||
{
|
||||
if (!data) return EINA_FALSE;
|
||||
|
||||
if (UNLIKELY((array->count + 1) > array->total))
|
||||
if (EINA_UNLIKELY((array->count + 1) > array->total))
|
||||
if (!eina_array_grow(array)) return EINA_FALSE;
|
||||
|
||||
array->data[array->count++] = (void*) data;
|
||||
|
|
|
@ -267,7 +267,7 @@ eina_array_grow(Eina_Array *array)
|
|||
total = array->total + array->step;
|
||||
eina_error_set(0);
|
||||
tmp = realloc(array->data, sizeof (void*) * total);
|
||||
if (UNLIKELY(!tmp)) {
|
||||
if (EINA_UNLIKELY(!tmp)) {
|
||||
eina_error_set(EINA_ERROR_OUT_OF_MEMORY);
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue