summaryrefslogtreecommitdiff
path: root/src/mongo/scripting
diff options
context:
space:
mode:
authorAndrew Morrow <acm@10gen.com>2013-02-28 16:02:55 -0500
committerAndrew Morrow <acm@10gen.com>2013-03-08 11:27:07 -0500
commitee31325070b204fe07fe80ad78c9ff06de5fc40e (patch)
tree890164faf38616662106235b48fb0538c0e13f13 /src/mongo/scripting
parent9e271caab68b239713c08221693e767055284824 (diff)
downloadmongo-ee31325070b204fe07fe80ad78c9ff06de5fc40e.tar.gz
Avoid enum/unsigned mismatch in case statement
Diffstat (limited to 'src/mongo/scripting')
-rw-r--r--src/mongo/scripting/engine_v8.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/scripting/engine_v8.cpp b/src/mongo/scripting/engine_v8.cpp
index f5adc04fd67..ac8f8ad8dbe 100644
--- a/src/mongo/scripting/engine_v8.cpp
+++ b/src/mongo/scripting/engine_v8.cpp
@@ -1633,7 +1633,8 @@ namespace mongo {
void V8Scope::v8ToMongoInternal(BSONObjBuilder& b,
const string& elementName,
v8::Handle<v8::Object> obj) {
- uint32_t bsonType = obj->GetInternalField(0)->ToUint32()->Value();
+ uint32_t bsonTypeRaw = obj->GetInternalField(0)->ToUint32()->Value();
+ BSONType bsonType = static_cast<BSONType>(bsonTypeRaw);
switch(bsonType) {
case Timestamp:
b.appendTimestamp(elementName,