diff options
author | Antonin Kral <a.kral@bobek.cz> | 2012-05-10 06:57:54 +0200 |
---|---|---|
committer | Antonin Kral <a.kral@bobek.cz> | 2012-05-10 06:57:54 +0200 |
commit | 61619b3142c1de8f60f91964ff2656054d4f11a6 (patch) | |
tree | d3aaf9d1e70cac8efa0856e5b5ba39e2fb9dc526 /util/assert_util.h | |
parent | eaaa7b30c99b89b5483e0a372bb73fe8c8695185 (diff) | |
download | mongodb-61619b3142c1de8f60f91964ff2656054d4f11a6.tar.gz |
Imported Upstream version 2.0.5
Diffstat (limited to 'util/assert_util.h')
-rw-r--r-- | util/assert_util.h | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/util/assert_util.h b/util/assert_util.h index b4c68b7..c35f651 100644 --- a/util/assert_util.h +++ b/util/assert_util.h @@ -171,20 +171,13 @@ namespace mongo { /** in the mongodb source, use verify() instead of assert(). verify is always evaluated even in release builds. */ inline void verify( int msgid , bool testOK ) { if ( ! testOK ) verifyFailed( msgid ); } -#ifdef assert -#undef assert -#endif - #define MONGO_assert(_Expression) (void)( MONGO_likely(!!(_Expression)) || (mongo::asserted(#_Expression, __FILE__, __LINE__), 0) ) -#define assert MONGO_assert /* "user assert". if asserts, user did something wrong, not our code */ #define MONGO_uassert(msgid, msg, expr) (void)( MONGO_likely(!!(expr)) || (mongo::uasserted(msgid, msg), 0) ) -#define uassert MONGO_uassert /* warning only - keeps going */ #define MONGO_wassert(_Expression) (void)( MONGO_likely(!!(_Expression)) || (mongo::wasserted(#_Expression, __FILE__, __LINE__), 0) ) -#define wassert MONGO_wassert /* display a message, no context, and throw assertionexception @@ -192,7 +185,6 @@ namespace mongo { display happening. */ #define MONGO_massert(msgid, msg, expr) (void)( MONGO_likely(!!(expr)) || (mongo::msgasserted(msgid, msg), 0) ) -#define massert MONGO_massert /* dassert is 'debug assert' -- might want to turn off for production as these could be slow. @@ -202,7 +194,6 @@ namespace mongo { #else # define MONGO_dassert(x) #endif -#define dassert MONGO_dassert // some special ids that we want to duplicate |