diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-25 14:25:58 -0800 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-01-25 14:25:58 -0800 |
commit | cbe647786f8631d32fc5f9226853950359207699 (patch) | |
tree | 6a27e0f5ca4c32f7d50ad8d0acaa413c9ea2497c /indra/llcommon/llerrorlegacy.h | |
parent | 2375afc4283e47a50516c1e003a6f699b0a2cfe1 (diff) |
We already have a LL_FORCE_INLINE in llpreprocessor.h, don't re-invent it for llfasttimers.h.
Also define LL_LIKELY/LL_UNLIKELY with a warning about its micro-optimizey nature, and use it to annotate llasserts (i.e. make llassert() lower-overhead and thus more attractive, even in inner-ish loops.)
Diffstat (limited to 'indra/llcommon/llerrorlegacy.h')
-rw-r--r-- | indra/llcommon/llerrorlegacy.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/indra/llcommon/llerrorlegacy.h b/indra/llcommon/llerrorlegacy.h index 9920921a58..476d75380f 100644 --- a/indra/llcommon/llerrorlegacy.h +++ b/indra/llcommon/llerrorlegacy.h @@ -34,7 +34,7 @@ #ifndef LL_LLERRORLEGACY_H #define LL_LLERRORLEGACY_H - +#include "llpreprocessor.h" /* LEGACY -- DO NOT USE THIS STUFF ANYMORE @@ -107,7 +107,7 @@ const int LL_ERR_PRICE_MISMATCH = -23018; #define llwarning(msg, num) llwarns << "Warning # " << num << ": " << msg << llendl; -#define llassert_always(func) if (!(func)) llerrs << "ASSERT (" << #func << ")" << llendl; +#define llassert_always(func) if (LL_UNLIKELY(!(func))) llerrs << "ASSERT (" << #func << ")" << llendl; #ifdef SHOW_ASSERT #define llassert(func) llassert_always(func) |