diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-10-08 16:35:15 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-10-08 16:35:15 -0400 |
commit | e6069e40d9673de8d0824fef22e387a8527883ef (patch) | |
tree | 5a61296220fdaf93e3968f5af2d6804c62d46833 /util | |
parent | ee72859d26fd63bb5e2c2c647480f2fe44f760eb (diff) | |
download | mongo-e6069e40d9673de8d0824fef22e387a8527883ef.tar.gz |
make assert use mongo::asserted so it'll work even with out using namepsace SERVER-289
Diffstat (limited to 'util')
-rw-r--r-- | util/assert_util.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/util/assert_util.h b/util/assert_util.h index 6e3ca156be2..b43161246b0 100644 --- a/util/assert_util.h +++ b/util/assert_util.h @@ -127,25 +127,25 @@ namespace mongo { #undef assert #endif -#define assert(_Expression) (void)( (!!(_Expression)) || (asserted(#_Expression, __FILE__, __LINE__), 0) ) +#define assert(_Expression) (void)( (!!(_Expression)) || (mongo::asserted(#_Expression, __FILE__, __LINE__), 0) ) /* "user assert". if asserts, user did something wrong, not our code */ //#define uassert(_Expression) (void)( (!!(_Expression)) || (uasserted(#_Expression, __FILE__, __LINE__), 0) ) -#define uassert(msg,_Expression) (void)( (!!(_Expression)) || (uasserted(msg), 0) ) +#define uassert(msg,_Expression) (void)( (!!(_Expression)) || (mongo::uasserted(msg), 0) ) -#define xassert(_Expression) (void)( (!!(_Expression)) || (asserted(#_Expression, __FILE__, __LINE__), 0) ) +#define xassert(_Expression) (void)( (!!(_Expression)) || (mongo::asserted(#_Expression, __FILE__, __LINE__), 0) ) #define yassert 1 /* warning only - keeps going */ -#define wassert(_Expression) (void)( (!!(_Expression)) || (wasserted(#_Expression, __FILE__, __LINE__), 0) ) +#define wassert(_Expression) (void)( (!!(_Expression)) || (mongo::wasserted(#_Expression, __FILE__, __LINE__), 0) ) /* display a message, no context, and throw assertionexception easy way to throw an exception and log something without our stack trace display happening. */ -#define massert(msg,_Expression) (void)( (!!(_Expression)) || (msgasserted(msg), 0) ) +#define massert(msg,_Expression) (void)( (!!(_Expression)) || (mongo::msgasserted(msg), 0) ) /* dassert is 'debug assert' -- might want to turn off for production as these could be slow. |