summaryrefslogtreecommitdiff
path: root/src/mongo/db/geo/hash.cpp
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2017-10-20 17:11:32 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2017-10-20 17:11:32 -0400
commit98c383e7e7b7f7e0bc9964e3d18f9aaa3539ff59 (patch)
tree6f6c8fbe44d49e129b836b7426a6f7c05bb05586 /src/mongo/db/geo/hash.cpp
parentf13e5ad084191e1b38992817c5796bbf6e6e9551 (diff)
downloadmongo-98c383e7e7b7f7e0bc9964e3d18f9aaa3539ff59.tar.gz
SERVER-17414 Enable Warnings As Errors on Windows, and disable/fix warnings
Diffstat (limited to 'src/mongo/db/geo/hash.cpp')
-rw-r--r--src/mongo/db/geo/hash.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/geo/hash.cpp b/src/mongo/db/geo/hash.cpp
index affc42e7fba..b00a637be43 100644
--- a/src/mongo/db/geo/hash.cpp
+++ b/src/mongo/db/geo/hash.cpp
@@ -847,7 +847,11 @@ double GeoHashConverter::sizeOfDiag(const GeoHash& a) const {
double GeoHashConverter::sizeEdge(unsigned level) const {
invariant(level >= 0);
invariant((int)level <= _params.bits);
+#pragma warning(push)
+// C4146: unary minus operator applied to unsigned type, result still unsigned
+#pragma warning(disable : 4146)
return ldexp(_params.max - _params.min, -level);
+#pragma warning(pop)
}
// Convert from a double in [0, (max-min)*scaling] to [min, max]