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:
parent
b446a74aec
commit
feb2a40d5f
@ -74,8 +74,13 @@ class Import : public Tool {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
b.append( fieldName , atoll( data.c_str() ) );
|
try {
|
||||||
return true;
|
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 ){
|
void _append( BSONObjBuilder& b , const string& fieldName , const string& data ){
|
||||||
|
Loading…
Reference in New Issue
Block a user