summaryrefslogtreecommitdiff
path: root/src/mongo/util/version
diff options
context:
space:
mode:
authorXueruiFa <xuerui.fa@mongodb.com>2021-07-28 14:45:50 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-08-18 17:22:39 +0000
commitb279be2955f187681d86abb46b086fbd47bdb4e2 (patch)
treec6c7b59ad130bb6307cef19b846c9fa779be6c7a /src/mongo/util/version
parent74f23536c303344ca42904362118e85db223dac0 (diff)
downloadmongo-b279be2955f187681d86abb46b086fbd47bdb4e2.tar.gz
SERVER-59013: Rewrite shell and JS tests to use generated FCV constants
Diffstat (limited to 'src/mongo/util/version')
-rw-r--r--src/mongo/util/version/releases.h.tpl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/util/version/releases.h.tpl b/src/mongo/util/version/releases.h.tpl
index 6cefa9d8579..724dd2aa149 100644
--- a/src/mongo/util/version/releases.h.tpl
+++ b/src/mongo/util/version/releases.h.tpl
@@ -107,10 +107,10 @@ enum class FeatureCompatibilityVersion {
};
## Calculate number of versions since v4.4.
-constexpr size_t kSince_$underscores(Version('4.4')) = ${len(fcvs) - 1};
+constexpr size_t kSince_$underscores(Version('4.4')) = ${bisect_left(fcvs, latest)};
// Last LTS was "$last_lts".
-constexpr size_t kSinceLastLTS = ${len(fcvs) - bisect_left(fcvs, last_lts) - 1};
+constexpr size_t kSinceLastLTS = ${bisect_left(fcvs, latest) - bisect_left(fcvs, last_lts)};
class GenericFCV {
#def define_fcv_alias(id, v):