diff --git a/mediapipe/tasks/cc/text/language_detector/custom_ops/ngram_hash_test.cc b/mediapipe/tasks/cc/text/language_detector/custom_ops/ngram_hash_test.cc index 844ae95e..b799afc2 100644 --- a/mediapipe/tasks/cc/text/language_detector/custom_ops/ngram_hash_test.cc +++ b/mediapipe/tasks/cc/text/language_detector/custom_ops/ngram_hash_test.cc @@ -198,7 +198,7 @@ TEST(NGramHashTest, ReturnsExpectedValueWhenMaxSplitsIsSpecified) { // A hash function that maps the given string to an index in the embedding // 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 = MurmurHash64WithSeed(str.c_str(), str.size(), kSeed); return static_cast((hash_value % vocab_sizes[vocab_idx]) + 1);