Skip to content

Commit

Permalink
don't build string for uassert in bson since uassert there isn't a macro
Browse files Browse the repository at this point in the history
  • Loading branch information
erh committed Jul 26, 2010
1 parent 4471c91 commit 91cc690
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion bson/bsonobjbuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -670,7 +670,8 @@ namespace mongo {
void fill( const StringData& name ) {
char *r;
int n = strtol( name.data(), &r, 10 );
uassert( 13048, (string)"can't append to array using string field name [" + name.data() + "]" , !*r );
if ( *r )
uasserted( 13048, (string)"can't append to array using string field name [" + name.data() + "]" );
while( _i < n )
append( nullElt() );
}
Expand Down

0 comments on commit 91cc690

Please sign in to comment.