summaryrefslogtreecommitdiff
path: root/src/mongo/db/hasher.h
diff options
context:
space:
mode:
authorJustin Seyster <justin.seyster@mongodb.com>2019-04-15 16:35:48 -0400
committerJustin Seyster <justin.seyster@mongodb.com>2019-04-15 16:49:42 -0400
commitec5473699c86897dc98fca6aac63eb92dcbcc1c4 (patch)
treebd3319fdfdffad15cd64600a6d7e1a289bcf9931 /src/mongo/db/hasher.h
parent195271e1c8254f26636331b9e07067e2eab16374 (diff)
downloadmongo-ec5473699c86897dc98fca6aac63eb92dcbcc1c4.tar.gz
SERVER-40513 Convert seed to little endian before hashing
Diffstat (limited to 'src/mongo/db/hasher.h')
-rw-r--r--src/mongo/db/hasher.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/hasher.h b/src/mongo/db/hasher.h
index c35eac19d56..20519e6a58f 100644
--- a/src/mongo/db/hasher.h
+++ b/src/mongo/db/hasher.h
@@ -38,7 +38,7 @@
namespace mongo {
-typedef int HashSeed;
+typedef int32_t HashSeed;
class BSONElementHasher {
BSONElementHasher(const BSONElementHasher&) = delete;
@@ -52,7 +52,7 @@ public:
* WARNING: do not change the hash see value. Hash-based sharding clusters will
* expect that value to be zero.
*/
- static const int DEFAULT_HASH_SEED = 0;
+ static constexpr HashSeed const DEFAULT_HASH_SEED = 0;
/* This computes a 64-bit hash of the value part of BSONElement "e",
* preceded by the seed "seed". Squashes element (and any sub-elements)