summaryrefslogtreecommitdiff
path: root/src/mongo/util/safe_num-inl.h
diff options
context:
space:
mode:
authorDavid Hatch <david.hatch@mongodb.com>2015-07-31 16:19:20 -0400
committerRaymond Jacobson <raymond.jacobson@10gen.com>2015-08-13 11:34:59 -0400
commit8fc4cbc675b90f96759b844ddfc4c52868a144f2 (patch)
tree1e5a687b2f9ce2e027d9fb0d20d7f58fd4016240 /src/mongo/util/safe_num-inl.h
parent9a81b7f1a6a8e0773703f2007c5a7268eb182b91 (diff)
downloadmongo-8fc4cbc675b90f96759b844ddfc4c52868a144f2.tar.gz
SERVER-19628 Add Decimal128 type support to update/delete code paths
Diffstat (limited to 'src/mongo/util/safe_num-inl.h')
-rw-r--r--src/mongo/util/safe_num-inl.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/util/safe_num-inl.h b/src/mongo/util/safe_num-inl.h
index 0327fa54b00..8ac16756f17 100644
--- a/src/mongo/util/safe_num-inl.h
+++ b/src/mongo/util/safe_num-inl.h
@@ -53,6 +53,10 @@ inline SafeNum::SafeNum(double num) : _type(NumberDouble) {
_value.doubleVal = num;
}
+inline SafeNum::SafeNum(Decimal128 num) : _type(NumberDecimal) {
+ _value.decimalVal = num.getValue();
+}
+
inline bool SafeNum::operator==(const SafeNum& rhs) const {
return isEquivalent(rhs);
}