Eina magic: add EINA_LIKELY.
This should improve performance as we use magic checks everywhere and it lets the compiler do better optimisations. SVN revision: 76113
This commit is contained in:
parent
52447357b6
commit
89413ab06e
|
@ -250,7 +250,7 @@ EAPI extern Eina_Error EINA_ERROR_MAGIC_FAILED;
|
|||
* If the magic feature of Eina is disabled, #EINA_MAGIC_CHECK is just
|
||||
* the value @c 1.
|
||||
*/
|
||||
#define EINA_MAGIC_CHECK(d, m) ((d) && ((d)->__magic == (m)))
|
||||
#define EINA_MAGIC_CHECK(d, m) (EINA_LIKELY((d) && ((d)->__magic == (m))))
|
||||
|
||||
/**
|
||||
* @def EINA_MAGIC_FAIL(d, m)
|
||||
|
|
Loading…
Reference in New Issue