diff options
author | Spencer T Brody <spencer@10gen.com> | 2013-09-19 19:27:26 -0400 |
---|---|---|
committer | Spencer T Brody <spencer@10gen.com> | 2013-09-20 11:52:01 -0400 |
commit | c3ae26de5f00a1547d3e99b4da4ede775d8f6516 (patch) | |
tree | 558cff60423be979b25c77298e29afa8e72a2ade /src/mongo | |
parent | 809f199116f4f23f786c92baa73af4bd3f036237 (diff) | |
download | mongo-c3ae26de5f00a1547d3e99b4da4ede775d8f6516.tar.gz |
Move declaration of _genFieldErrMsg in FieldParser into the header file
Diffstat (limited to 'src/mongo')
-rw-r--r-- | src/mongo/db/field_parser-inl.h | 11 | ||||
-rw-r--r-- | src/mongo/db/field_parser.cpp | 11 |
2 files changed, 11 insertions, 11 deletions
diff --git a/src/mongo/db/field_parser-inl.h b/src/mongo/db/field_parser-inl.h index 2fad7dd0261..8e217dd8981 100644 --- a/src/mongo/db/field_parser-inl.h +++ b/src/mongo/db/field_parser-inl.h @@ -33,6 +33,17 @@ namespace mongo { using mongoutils::str::stream; + template<class T> + void _genFieldErrMsg(const BSONObj& doc, + const BSONField<T>& field, + const string expected, + string* errMsg) + { + if (!errMsg) return; + *errMsg = stream() << "wrong type for '" << field() << "' field, expected " << expected + << ", found " << doc[field.name()].toString(); + } + template<typename T> FieldParser::FieldState FieldParser::extract(BSONObj doc, const BSONField<T>& field, diff --git a/src/mongo/db/field_parser.cpp b/src/mongo/db/field_parser.cpp index 7c91c2004d3..0ce90b95e9a 100644 --- a/src/mongo/db/field_parser.cpp +++ b/src/mongo/db/field_parser.cpp @@ -33,17 +33,6 @@ namespace mongo { using mongoutils::str::stream; - template<class T> - void _genFieldErrMsg(const BSONObj& doc, - const BSONField<T>& field, - const string expected, - string* errMsg) - { - if (!errMsg) return; - *errMsg = stream() << "wrong type for '" << field() << "' field, expected " << expected - << ", found " << doc[field.name()].toString(); - } - FieldParser::FieldState FieldParser::extract(BSONObj doc, const BSONField<bool>& field, bool* out, |