diff options
author | Kevin Albertson <kevin.albertson@10gen.com> | 2015-07-20 10:23:24 -0400 |
---|---|---|
committer | Kevin Albertson <kevin.albertson@10gen.com> | 2015-07-20 10:48:14 -0400 |
commit | 85f9c15c98f9490d81e2bdc6ba4a4c8162eaa0f4 (patch) | |
tree | bf32a6e006dbd7f1cbf029893af378ee73c91900 /src | |
parent | d0dd378bea15f8dd71312cf33f435ab7cbc06b5a (diff) | |
download | mongo-85f9c15c98f9490d81e2bdc6ba4a4c8162eaa0f4.tar.gz |
SERVER-19168 Move variable declarations
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/index/expression_params.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/index/expression_params.cpp b/src/mongo/db/index/expression_params.cpp index 872e9d921af..b9c13434722 100644 --- a/src/mongo/db/index/expression_params.cpp +++ b/src/mongo/db/index/expression_params.cpp @@ -133,7 +133,7 @@ void ExpressionParams::parse2dsphereParams(const BSONObj& infoObj, S2IndexingPar static const std::string kFinestIndexedLevel("finestIndexedLevel"); static const std::string kCoarsestIndexedLevel("coarsestIndexedLevel"); - long long finestIndexedLevel, coarsestIndexedLevel, maxCellsInCovering, indexVersion; + long long indexVersion; // Determine which version of this index we're using. If none was set in the descriptor, // assume S2_INDEX_VERSION_1 (alas, the first version predates the existence of the version @@ -143,7 +143,6 @@ void ExpressionParams::parse2dsphereParams(const BSONObj& infoObj, S2IndexingPar out->indexVersion = static_cast<S2IndexVersion>(indexVersion); - // Note: In version > 2, these levels are for non-points. // Points are always indexed to the finest level. // Default levels were optimized for buildings and state regions @@ -158,6 +157,8 @@ void ExpressionParams::parse2dsphereParams(const BSONObj& infoObj, S2IndexingPar defaultMaxCellsInCovering = 50; } + long long finestIndexedLevel, coarsestIndexedLevel, maxCellsInCovering; + bsonExtractIntegerFieldWithDefault( infoObj, "finestIndexedLevel", defaultFinestIndexedLevel, &finestIndexedLevel); bsonExtractIntegerFieldWithDefault( |