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

use lexical_cast instead of atoll b/c of windows

This commit is contained in:
Eliot Horowitz 2009-10-21 14:17:58 -04:00
parent b446a74aec
commit feb2a40d5f

View File

@ -74,8 +74,13 @@ class Import : public Tool {
return true;
}
b.append( fieldName , atoll( data.c_str() ) );
return true;
try {
b.append( fieldName , boost::lexical_cast<long long>( data ) );
return true;
}
catch(bad_lexical_cast &){
return false;
}
}
void _append( BSONObjBuilder& b , const string& fieldName , const string& data ){