summaryrefslogtreecommitdiff
path: root/src/mongo/bson/oid.cpp
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2012-03-26 12:58:35 -0400
committerEliot Horowitz <eliot@10gen.com>2012-03-26 12:58:52 -0400
commitbd6d0c99195e324e14390205e2bc6ff88c01e365 (patch)
treef9306b37b7d3302b4dd6e5f628fcf9886a09cf15 /src/mongo/bson/oid.cpp
parenta56eef7bd9a5d390182ea64118e11420b052a380 (diff)
downloadmongo-bd6d0c99195e324e14390205e2bc6ff88c01e365.tar.gz
replace assert with verify SERVER-1259
Diffstat (limited to 'src/mongo/bson/oid.cpp')
-rw-r--r--src/mongo/bson/oid.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mongo/bson/oid.cpp b/src/mongo/bson/oid.cpp
index 77c7cd0687f..b70b96352f8 100644
--- a/src/mongo/bson/oid.cpp
+++ b/src/mongo/bson/oid.cpp
@@ -21,8 +21,7 @@
#include "../db/nonce.h"
#include "bsonobjbuilder.h"
#include <boost/functional/hash.hpp>
-#undef assert
-#define assert MONGO_assert
+#define verify MONGO_verify
BOOST_STATIC_ASSERT( sizeof(mongo::OID) == 12 );
@@ -71,7 +70,7 @@ namespace mongo {
nonce64 a = Security::getNonceDuringInit();
nonce64 b = Security::getNonceDuringInit();
nonce64 c = Security::getNonceDuringInit();
- assert( !(a==b && b==c) );
+ verify( !(a==b && b==c) );
}
unsigned long long n = Security::getNonceDuringInit();
@@ -106,7 +105,7 @@ namespace mongo {
// xor in the pid into _pid. this reduces the probability of collisions.
foldInPid(x);
ourMachineAndPid = genMachineAndPid();
- assert( x != ourMachineAndPid );
+ verify( x != ourMachineAndPid );
ourMachineAndPid = x;
}
@@ -134,7 +133,7 @@ namespace mongo {
}
void OID::init( string s ) {
- assert( s.size() == 24 );
+ verify( s.size() == 24 );
const char *p = s.c_str();
for( int i = 0; i < 12; i++ ) {
data[i] = fromHex(p);