diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-07-18 11:14:32 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-07-18 11:14:32 -0400 |
commit | 867b9c16f10c6b86da89c862902662b70cf61f38 (patch) | |
tree | 72dfd588f8f947d2f0d15b407ff5d792ee9c3f82 /bson/bsoninlines.h | |
parent | 72f2eb24d5f27717b239789e0ad1011407a44363 (diff) | |
download | mongo-867b9c16f10c6b86da89c862902662b70cf61f38.tar.gz |
use StringData in place rather than hacking
Diffstat (limited to 'bson/bsoninlines.h')
-rw-r--r-- | bson/bsoninlines.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/bson/bsoninlines.h b/bson/bsoninlines.h index 6835390a775..120ac624c77 100644 --- a/bson/bsoninlines.h +++ b/bson/bsoninlines.h @@ -75,11 +75,11 @@ namespace mongo { return false; } - inline BSONElement BSONObj::getField(const char *name) const { + inline BSONElement BSONObj::getField(const StringData& name) const { BSONObjIterator i(*this); while ( i.more() ) { BSONElement e = i.next(); - if ( strcmp(e.fieldName(), name) == 0 ) + if ( strcmp(e.fieldName(), name.data) == 0 ) return e; } return BSONElement(); |