diff options
Diffstat (limited to 'src/mongo/db/geo/hash.cpp')
-rw-r--r-- | src/mongo/db/geo/hash.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/mongo/db/geo/hash.cpp b/src/mongo/db/geo/hash.cpp index 761f8c79213..f8ebed9a7da 100644 --- a/src/mongo/db/geo/hash.cpp +++ b/src/mongo/db/geo/hash.cpp @@ -667,19 +667,13 @@ Status GeoHashConverter::parseParameters(const BSONObj& paramDoc, if (params->bits < 1 || params->bits > 32) { return Status(ErrorCodes::InvalidOptions, str::stream() << "bits for hash must be > 0 and <= 32, " - << "but " - << params->bits - << " bits were specified"); + << "but " << params->bits << " bits were specified"); } if (params->min >= params->max) { return Status(ErrorCodes::InvalidOptions, str::stream() << "region for hash must be valid and have positive area, " - << "but [" - << params->min - << ", " - << params->max - << "] " + << "but [" << params->min << ", " << params->max << "] " << "was specified"); } @@ -774,8 +768,7 @@ GeoHash GeoHashConverter::hash(const BSONObj& o, const BSONObj* src) const { GeoHash GeoHashConverter::hash(double x, double y) const { uassert(16433, str::stream() << "point not in interval of [ " << _params.min << ", " << _params.max - << " ]" - << causedBy(BSON_ARRAY(x << y).toString()), + << " ]" << causedBy(BSON_ARRAY(x << y).toString()), x <= _params.max && x >= _params.min && y <= _params.max && y >= _params.min); return GeoHash(convertToHashScale(x), convertToHashScale(y), _params.bits); |