Fix yet another Windows compile error

PiperOrigin-RevId: 523835509
This commit is contained in:
Sebastian Schmidt 2023-04-12 16:23:51 -07:00 committed by Copybara-Service
parent d0e8a9e09b
commit f23dd69db1

View File

@ -198,7 +198,7 @@ TEST(NGramHashTest, ReturnsExpectedValueWhenMaxSplitsIsSpecified) {
// 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 = [=](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);