From c29ab7f083a8195b1a82bb39ec5abcab54b3e83c Mon Sep 17 00:00:00 2001 From: Sebastian Schmidt Date: Thu, 26 Jan 2023 13:34:36 -0800 Subject: [PATCH] Internal change PiperOrigin-RevId: 504928797 --- mediapipe/framework/BUILD | 1 + mediapipe/framework/subgraph.cc | 2 +- mediapipe/framework/subgraph.h | 3 ++- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mediapipe/framework/BUILD b/mediapipe/framework/BUILD index da8ef3b3e..e082ef2e6 100644 --- a/mediapipe/framework/BUILD +++ b/mediapipe/framework/BUILD @@ -1051,6 +1051,7 @@ cc_library( "@com_google_absl//absl/base:core_headers", "@com_google_absl//absl/memory", "@com_google_absl//absl/status", + "@com_google_absl//absl/strings", "@com_google_absl//absl/types:optional", ], ) diff --git a/mediapipe/framework/subgraph.cc b/mediapipe/framework/subgraph.cc index d0f018e1a..7cbde28bf 100644 --- a/mediapipe/framework/subgraph.cc +++ b/mediapipe/framework/subgraph.cc @@ -92,7 +92,7 @@ bool GraphRegistry::IsRegistered(const std::string& ns, } absl::StatusOr GraphRegistry::CreateByName( - const std::string& ns, const std::string& type_name, + absl::string_view ns, absl::string_view type_name, SubgraphContext* context) const { absl::StatusOr> maker = local_factories_.IsRegistered(ns, type_name) diff --git a/mediapipe/framework/subgraph.h b/mediapipe/framework/subgraph.h index b3e7d958b..5b1d9646a 100644 --- a/mediapipe/framework/subgraph.h +++ b/mediapipe/framework/subgraph.h @@ -20,6 +20,7 @@ #include "absl/base/macros.h" #include "absl/memory/memory.h" #include "absl/status/status.h" +#include "absl/strings/string_view.h" #include "absl/types/optional.h" #include "mediapipe/framework/calculator.pb.h" #include "mediapipe/framework/deps/registration.h" @@ -187,7 +188,7 @@ class GraphRegistry { // Returns the specified graph config. absl::StatusOr CreateByName( - const std::string& ns, const std::string& type_name, + absl::string_view ns, absl::string_view type_name, SubgraphContext* context = nullptr) const; static GraphRegistry global_graph_registry;