summaryrefslogtreecommitdiff
path: root/src/mongo/db/geo
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2017-07-25 09:05:13 -0400
committerMathias Stearn <mathias@10gen.com>2017-07-26 15:13:34 -0400
commitb35c594738261edce2134b0bc7fb3e7a06e85fc3 (patch)
treec50a5444e14d7f0dd3756e188642cac42bfe2a24 /src/mongo/db/geo
parent2f81beb98df291431c36dcd5789828297b8c41a8 (diff)
downloadmongo-b35c594738261edce2134b0bc7fb3e7a06e85fc3.tar.gz
SERVER-29887 address clang-4.0 warnings in geo code
Diffstat (limited to 'src/mongo/db/geo')
-rw-r--r--src/mongo/db/geo/r2_region_coverer.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/mongo/db/geo/r2_region_coverer.cpp b/src/mongo/db/geo/r2_region_coverer.cpp
index 47ba2528328..4d7791dc1e3 100644
--- a/src/mongo/db/geo/r2_region_coverer.cpp
+++ b/src/mongo/db/geo/r2_region_coverer.cpp
@@ -68,15 +68,13 @@ R2RegionCoverer::R2RegionCoverer(GeoHashConverter* hashConverter)
R2RegionCoverer::~R2RegionCoverer() {}
void R2RegionCoverer::setMinLevel(unsigned int minLevel) {
- dassert(minLevel >= 0);
dassert(minLevel <= GeoHash::kMaxBits);
- _minLevel = max(0u, min(GeoHash::kMaxBits, minLevel));
+ _minLevel = min(GeoHash::kMaxBits, minLevel);
}
void R2RegionCoverer::setMaxLevel(unsigned int maxLevel) {
- dassert(maxLevel >= 0);
dassert(maxLevel <= GeoHash::kMaxBits);
- _maxLevel = max(0u, min(GeoHash::kMaxBits, maxLevel));
+ _maxLevel = min(GeoHash::kMaxBits, maxLevel);
}
void R2RegionCoverer::setMaxCells(int maxCells) {