diff options
author | Eliot Horowitz <eliot@10gen.com> | 2012-12-19 14:45:07 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2012-12-19 22:19:52 -0500 |
commit | 4be4883faac46fbe45ec65c5ec4e9a93ddaf85e0 (patch) | |
tree | f2fcb60bce51ff9fb36259842b2382a2f5e9a365 /src/mongo/db/keypattern.h | |
parent | a87855d8b537175c2cb47251369f0d6a2149489d (diff) | |
download | mongo-4be4883faac46fbe45ec65c5ec4e9a93ddaf85e0.tar.gz |
StringData for KeyPattern and ShardKeyPattern
Diffstat (limited to 'src/mongo/db/keypattern.h')
-rw-r--r-- | src/mongo/db/keypattern.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/db/keypattern.h b/src/mongo/db/keypattern.h index ec492f55eae..2bf02dd7bc6 100644 --- a/src/mongo/db/keypattern.h +++ b/src/mongo/db/keypattern.h @@ -18,6 +18,7 @@ #pragma once +#include "mongo/base/string_data.h" #include "mongo/db/jsobj.h" #include "mongo/util/mongoutils/str.h" @@ -57,7 +58,7 @@ namespace mongo { * Returns true if the given fieldname is the name of one element of the (potentially) * compound key described by this KeyPattern. */ - bool hasField( const char* fieldname ) const { return _pattern.hasField( fieldname ); } + bool hasField( const StringData& fieldname ) const { return _pattern.hasField( fieldname ); } /* * Gets the element of this pattern corresponding to the given fieldname. |