0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-11-30 00:56:44 +01:00

Silence warnings

This commit is contained in:
Mathias Stearn 2009-12-09 15:01:55 -05:00
parent f684565c71
commit f64ec0964a
3 changed files with 5 additions and 2 deletions

View File

@ -71,7 +71,8 @@ namespace mongo {
builder.appendNull( fieldName );
break;
case Date:
builder.appendDate( fieldName , Date_t(getNumber( scopeName )) );
// TODO: make signed
builder.appendDate( fieldName , Date_t((unsigned long long)getNumber( scopeName )) );
break;
default:
stringstream temp;

View File

@ -797,7 +797,8 @@ namespace mongo {
#else
if ( JS_InstanceOf( c->_context , o, &js_DateClass , 0 ) ){
jsdouble d = js_DateGetMsecSinceEpoch( c->_context , o );
b.appendDate( name.c_str() , Date_t(d) );
//TODO: make signed
b.appendDate( name.c_str() , Date_t((unsigned long long)d) );
return true;
}
#endif

View File

@ -220,6 +220,7 @@ namespace mongo {
}
struct Date_t {
// TODO: make signed (and look for related TODO's)
unsigned long long millis;
Date_t(): millis(0) {}
Date_t(unsigned long long m): millis(m) {}