diff options
author | Eliot Horowitz <eliot@10gen.com> | 2012-03-26 12:58:35 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2012-03-26 12:58:52 -0400 |
commit | bd6d0c99195e324e14390205e2bc6ff88c01e365 (patch) | |
tree | f9306b37b7d3302b4dd6e5f628fcf9886a09cf15 /src/mongo/util/time_support.h | |
parent | a56eef7bd9a5d390182ea64118e11420b052a380 (diff) | |
download | mongo-bd6d0c99195e324e14390205e2bc6ff88c01e365.tar.gz |
replace assert with verify SERVER-1259
Diffstat (limited to 'src/mongo/util/time_support.h')
-rw-r--r-- | src/mongo/util/time_support.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/mongo/util/time_support.h b/src/mongo/util/time_support.h index 69e32be709c..ad3cdbf4598 100644 --- a/src/mongo/util/time_support.h +++ b/src/mongo/util/time_support.h @@ -23,8 +23,6 @@ #include <boost/thread/tss.hpp> #include <boost/date_time/posix_time/posix_time.hpp> #include <boost/thread/xtime.hpp> -#undef assert -#define assert MONGO_assert #include "../bson/util/misc.h" // Date_t namespace mongo { @@ -51,7 +49,7 @@ namespace mongo { const char* fmt = (colonsOk ? "%Y-%m-%dT%H:%M:%S" : "%Y-%m-%dT%H-%M-%S"); char buf[32]; - assert(strftime(buf, sizeof(buf), fmt, &t) == 19); + verify(strftime(buf, sizeof(buf), fmt, &t) == 19); return buf; } @@ -61,7 +59,7 @@ namespace mongo { const char* fmt = "%Y-%m-%dT%H:%M:%SZ"; char buf[32]; - assert(strftime(buf, sizeof(buf), fmt, &t) == 20); + verify(strftime(buf, sizeof(buf), fmt, &t) == 20); return buf; } @@ -104,7 +102,7 @@ namespace mongo { Sleep(s*1000); } inline void sleepmillis(long long s) { - assert( s <= 0xffffffff ); + verify( s <= 0xffffffff ); Sleep((DWORD) s); } inline void sleepmicros(long long s) { |