summaryrefslogtreecommitdiff
path: root/src/mongo
diff options
context:
space:
mode:
authorSpencer T Brody <spencer@10gen.com>2013-09-19 19:27:26 -0400
committerSpencer T Brody <spencer@10gen.com>2013-09-20 11:52:01 -0400
commitc3ae26de5f00a1547d3e99b4da4ede775d8f6516 (patch)
tree558cff60423be979b25c77298e29afa8e72a2ade /src/mongo
parent809f199116f4f23f786c92baa73af4bd3f036237 (diff)
downloadmongo-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.h11
-rw-r--r--src/mongo/db/field_parser.cpp11
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,