summaryrefslogtreecommitdiff
path: root/src/mongo/db/index/s2_access_method.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/index/s2_access_method.cpp')
-rw-r--r--src/mongo/db/index/s2_access_method.cpp36
1 files changed, 9 insertions, 27 deletions
diff --git a/src/mongo/db/index/s2_access_method.cpp b/src/mongo/db/index/s2_access_method.cpp
index 3f9ac46d57e..6881641b23b 100644
--- a/src/mongo/db/index/s2_access_method.cpp
+++ b/src/mongo/db/index/s2_access_method.cpp
@@ -97,30 +97,18 @@ StatusWith<BSONObj> S2AccessMethod::fixSpec(const BSONObj& specObj) {
if (!indexVersionElt.isNumber()) {
return {ErrorCodes::CannotCreateIndex,
str::stream() << "Invalid type for geo index version { " << kIndexVersionFieldName
- << " : "
- << indexVersionElt
- << " }, only versions: ["
- << S2_INDEX_VERSION_1
- << ","
- << S2_INDEX_VERSION_2
- << ","
- << S2_INDEX_VERSION_3
- << "] are supported"};
+ << " : " << indexVersionElt << " }, only versions: ["
+ << S2_INDEX_VERSION_1 << "," << S2_INDEX_VERSION_2 << ","
+ << S2_INDEX_VERSION_3 << "] are supported"};
}
if (indexVersionElt.type() == BSONType::NumberDouble &&
!std::isnormal(indexVersionElt.numberDouble())) {
return {ErrorCodes::CannotCreateIndex,
str::stream() << "Invalid value for geo index version { " << kIndexVersionFieldName
- << " : "
- << indexVersionElt
- << " }, only versions: ["
- << S2_INDEX_VERSION_1
- << ","
- << S2_INDEX_VERSION_2
- << ","
- << S2_INDEX_VERSION_3
- << "] are supported"};
+ << " : " << indexVersionElt << " }, only versions: ["
+ << S2_INDEX_VERSION_1 << "," << S2_INDEX_VERSION_2 << ","
+ << S2_INDEX_VERSION_3 << "] are supported"};
}
const auto indexVersion = indexVersionElt.numberLong();
@@ -128,15 +116,9 @@ StatusWith<BSONObj> S2AccessMethod::fixSpec(const BSONObj& specObj) {
indexVersion != S2_INDEX_VERSION_3) {
return {ErrorCodes::CannotCreateIndex,
str::stream() << "unsupported geo index version { " << kIndexVersionFieldName
- << " : "
- << indexVersionElt
- << " }, only versions: ["
- << S2_INDEX_VERSION_1
- << ","
- << S2_INDEX_VERSION_2
- << ","
- << S2_INDEX_VERSION_3
- << "] are supported"};
+ << " : " << indexVersionElt << " }, only versions: ["
+ << S2_INDEX_VERSION_1 << "," << S2_INDEX_VERSION_2 << ","
+ << S2_INDEX_VERSION_3 << "] are supported"};
}
return specObj;