From e440a4da56d75d1400feedc4fd63b33f96abdc9a Mon Sep 17 00:00:00 2001 From: MediaPipe Team Date: Wed, 15 Nov 2023 02:16:29 -0800 Subject: [PATCH] Explicitly delete some copy operations to improve compile errors. PiperOrigin-RevId: 582595026 --- mediapipe/framework/api2/builder.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/mediapipe/framework/api2/builder.h b/mediapipe/framework/api2/builder.h index fde281121..c82998040 100644 --- a/mediapipe/framework/api2/builder.h +++ b/mediapipe/framework/api2/builder.h @@ -330,6 +330,14 @@ using MultiSideDestination = MultiPort>; class NodeBase { public: + NodeBase() = default; + ~NodeBase() = default; + NodeBase(NodeBase&&) = default; + NodeBase& operator=(NodeBase&&) = default; + // Explicitly delete copies to improve error messages. + NodeBase(const NodeBase&) = delete; + NodeBase& operator=(const NodeBase&) = delete; + // TODO: right now access to an indexed port is made directly by // specifying both a tag and an index. It would be better to represent this // as a two-step lookup, first getting a multi-port, and then accessing one @@ -585,6 +593,14 @@ class PacketGenerator { class Graph { public: + Graph() = default; + ~Graph() = default; + Graph(Graph&&) = default; + Graph& operator=(Graph&&) = default; + // Explicitly delete copies to improve error messages. + Graph(const Graph&) = delete; + Graph& operator=(const Graph&) = delete; + void SetType(std::string type) { type_ = std::move(type); } // Creates a node of a specific type. Should be used for calculators whose