Enable absl::string_view kCalculatorName

PiperOrigin-RevId: 488781493
This commit is contained in:
MediaPipe Team 2022-11-15 15:56:36 -08:00 committed by Copybara-Service
parent a520d6cc38
commit fae55910f4

View File

@ -412,11 +412,11 @@ using GenericNode = Node<internal::Generic>;
template <class Calc>
class Node : public NodeBase {
public:
Node() : NodeBase(Calc::kCalculatorName) {}
Node() : NodeBase(std::string(Calc::kCalculatorName)) {}
// Overrides the built-in calculator type string with the provided argument.
// Can be used to create nodes from pure interfaces.
// TODO: only use this for pure interfaces
Node(const std::string& type_override) : NodeBase(type_override) {}
Node(std::string type_override) : NodeBase(std::move(type_override)) {}
// These methods only allow access to ports declared in the contract.
// The argument must be a tag object created with the MPP_TAG macro.