Fix Windows compilation error

PiperOrigin-RevId: 523739720
This commit is contained in:
Sebastian Schmidt 2023-04-12 10:32:14 -07:00 committed by Copybara-Service
parent efab342a52
commit f9a2d0995d

View File

@ -120,7 +120,7 @@ TEST(NGramHashTest, ReturnsExpectedValueWhenInputIsSane) {
// A hash function that maps the given string to an index in the embedding // A hash function that maps the given string to an index in the embedding
// table denoted by `vocab_idx`. // table denoted by `vocab_idx`.
auto hash = [vocab_sizes](std::string str, const int vocab_idx) { auto hash = [vocab_sizes, kSeed](std::string str, const int vocab_idx) {
const auto hash_value = const auto hash_value =
MurmurHash64WithSeed(str.c_str(), str.size(), kSeed); MurmurHash64WithSeed(str.c_str(), str.size(), kSeed);
return static_cast<int>((hash_value % vocab_sizes[vocab_idx]) + 1); return static_cast<int>((hash_value % vocab_sizes[vocab_idx]) + 1);