diff --git a/mediapipe/framework/tool/BUILD b/mediapipe/framework/tool/BUILD index 4ae0bb607..b7c563b92 100644 --- a/mediapipe/framework/tool/BUILD +++ b/mediapipe/framework/tool/BUILD @@ -530,6 +530,7 @@ cc_library( "//mediapipe/framework/port:ret_check", "//mediapipe/framework/port:status", "@com_google_absl//absl/base:core_headers", + "@com_google_absl//absl/container:flat_hash_set", "@com_google_absl//absl/memory", "@com_google_absl//absl/strings", ], diff --git a/mediapipe/framework/tool/template_parser.cc b/mediapipe/framework/tool/template_parser.cc index ad799c34f..743df9fb1 100644 --- a/mediapipe/framework/tool/template_parser.cc +++ b/mediapipe/framework/tool/template_parser.cc @@ -20,6 +20,7 @@ #include #include +#include "absl/container/flat_hash_set.h" #include "absl/memory/memory.h" #include "absl/strings/ascii.h" #include "absl/strings/numbers.h" @@ -1430,10 +1431,10 @@ std::vector GetFields(const Message* src) { // Orders map entries in dst to match src. void OrderMapEntries(const Message* src, Message* dst, - std::set* seen = nullptr) { - std::unique_ptr> seen_owner; + absl::flat_hash_set* seen = nullptr) { + std::unique_ptr> seen_owner; if (!seen) { - seen_owner = std::make_unique>(); + seen_owner = std::make_unique>(); seen = seen_owner.get(); } if (seen->count(src) > 0) {