X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.0%2Fdb%2Ftdb.h;fp=cinelerra-5.0%2Fdb%2Ftdb.h;h=f7472038611df9cd25fdaff062f82eebb1a3d645;hb=328cb789bec2048b23fc731cf4eae860dbacd2b6;hp=452ea7e658d05181fac059a38963119c57a37cb2;hpb=3564c71f425f390745eb7c75d5121689d53e14c2;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.0/db/tdb.h b/cinelerra-5.0/db/tdb.h index 452ea7e6..f7472038 100644 --- a/cinelerra-5.0/db/tdb.h +++ b/cinelerra-5.0/db/tdb.h @@ -14,9 +14,13 @@ #define entityNmIndex indecies[entityNmIdx] #define noThrow std::nothrow +#ifndef likely #define likely(x) (__builtin_constant_p(x) ? !!(x) : __builtin_expect(!!(x), 1)) #define unlikely(x) (__builtin_constant_p(x) ? !!(x) : __builtin_expect(!!(x), 0)) +#endif +#ifndef lengthof #define lengthof(x) ((int)(sizeof(x)/sizeof(x[0]))) +#endif #if 0 inline void *operator new(size_t n) { void *vp = malloc(n); bzero(vp,n); return vp; }