replace UNLIKELY() with EINA_UNLIKELY()

SVN revision: 42354
This commit is contained in:
Gustavo Sverzut Barbieri 2009-09-08 21:42:17 +00:00
parent c88e3887d8
commit c98bf92366
2 changed files with 2 additions and 7 deletions

View File

@ -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;

View File

@ -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;
}