summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--db/client.cpp15
-rwxr-xr-xdb/pipeline/value.cpp2
2 files changed, 9 insertions, 8 deletions
diff --git a/db/client.cpp b/db/client.cpp
index 831b929bf56..92b78d87ee5 100644
--- a/db/client.cpp
+++ b/db/client.cpp
@@ -605,6 +605,7 @@ namespace mongo {
#define OPDEBUG_TOSTRING_HELP(x) if( x >= 0 ) s << " " #x ":" << (x)
+#define OPDEBUG_TOSTRING_HELP_BOOL(x) if( x ) s << " " #x ":" << (x)
string OpDebug::toString() const {
StringBuilder s( ns.size() + 64 );
if ( iscommand )
@@ -629,15 +630,15 @@ namespace mongo {
OPDEBUG_TOSTRING_HELP( cursorid );
OPDEBUG_TOSTRING_HELP( ntoreturn );
OPDEBUG_TOSTRING_HELP( ntoskip );
- OPDEBUG_TOSTRING_HELP( exhaust );
+ OPDEBUG_TOSTRING_HELP_BOOL( exhaust );
OPDEBUG_TOSTRING_HELP( nscanned );
- OPDEBUG_TOSTRING_HELP( idhack );
- OPDEBUG_TOSTRING_HELP( scanAndOrder );
- OPDEBUG_TOSTRING_HELP( moved );
- OPDEBUG_TOSTRING_HELP( fastmod );
- OPDEBUG_TOSTRING_HELP( fastmodinsert );
- OPDEBUG_TOSTRING_HELP( upsert );
+ OPDEBUG_TOSTRING_HELP_BOOL( idhack );
+ OPDEBUG_TOSTRING_HELP_BOOL( scanAndOrder );
+ OPDEBUG_TOSTRING_HELP_BOOL( moved );
+ OPDEBUG_TOSTRING_HELP_BOOL( fastmod );
+ OPDEBUG_TOSTRING_HELP_BOOL( fastmodinsert );
+ OPDEBUG_TOSTRING_HELP_BOOL( upsert );
OPDEBUG_TOSTRING_HELP( keyUpdates );
if ( extra.len() )
diff --git a/db/pipeline/value.cpp b/db/pipeline/value.cpp
index 4fe5dabdfed..b83dec359cf 100755
--- a/db/pipeline/value.cpp
+++ b/db/pipeline/value.cpp
@@ -274,7 +274,7 @@ namespace mongo {
if (type == NumberInt)
return simple.intValue;
if (type == NumberLong)
- return simple.longValue;
+ return static_cast< double >( simple.longValue );
assert(type == NumberDouble);
return simple.doubleValue;