diff options
author | Eric Milkie <milkie@10gen.com> | 2012-05-09 14:09:32 -0400 |
---|---|---|
committer | Eric Milkie <milkie@10gen.com> | 2012-05-09 14:30:20 -0400 |
commit | d755084b016461e4deed7712467575d0e075a983 (patch) | |
tree | e4222e8cb95eb33285b31d36525872dfdb594441 /src/mongo/bson/bsonelement.h | |
parent | f15931d902441c5d3b881a0ab8222a5ca8e8303c (diff) | |
download | mongo-d755084b016461e4deed7712467575d0e075a983.tar.gz |
reverting last three isnan changes, taking different tack
reverted:
f15931d902441c5d3b881a0ab8222a5ca8e8303c
ccc9b9e5139188fd80a278ef94453e6c905d2639
8e80bc36e29cdb47eb07e13d14ae0a0af6cd3084
Diffstat (limited to 'src/mongo/bson/bsonelement.h')
-rw-r--r-- | src/mongo/bson/bsonelement.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/mongo/bson/bsonelement.h b/src/mongo/bson/bsonelement.h index 078ed434421..e7ea3d8dc77 100644 --- a/src/mongo/bson/bsonelement.h +++ b/src/mongo/bson/bsonelement.h @@ -18,8 +18,7 @@ #pragma once #include <vector> -#include <float.h> -#include <math.h> +#include <cmath> #include <string.h> #include "util/builder.h" #include "bsontypes.h" @@ -262,14 +261,14 @@ namespace mongo { /** Get javascript code of a CodeWScope data element. */ const char * codeWScopeCode() const { - massert( 16225 , "not codeWScope" , type() == CodeWScope ); + massert( 16177 , "not codeWScope" , type() == CodeWScope ); return value() + 4 + 4; //two ints precede code (see BSON spec) } /** Get length of the code part of the CodeWScope object * This INCLUDES the null char at the end */ int codeWScopeCodeLen() const { - massert( 16226 , "not codeWScope" , type() == CodeWScope ); + massert( 16178 , "not codeWScope" , type() == CodeWScope ); return *(int *)( value() + 4 ); } @@ -608,7 +607,7 @@ namespace mongo { switch( type() ) { case NumberDouble: d = numberDouble(); - if ( mongo_isnan( d ) ){ + if ( std::isnan( d ) ){ return 0; } if ( d > (double) std::numeric_limits<long long>::max() ){ |