From 96b68f0c39b02b41f96245cedcc156c60c3317e2 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 27 Nov 2020 17:58:11 +0100 Subject: Explicitly delete or define all special member functions --- src/PortID.hpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) (limited to 'src/PortID.hpp') diff --git a/src/PortID.hpp b/src/PortID.hpp index 8132639..c29d662 100644 --- a/src/PortID.hpp +++ b/src/PortID.hpp @@ -59,21 +59,13 @@ struct PortID } #endif - PortID(const PortID& copy) - : type(copy.type) - { - memcpy(&id, ©.id, sizeof(id)); - } + PortID(const PortID& copy) = default; + PortID& operator=(const PortID& copy) = default; - PortID& operator=(const PortID& copy) - { - if (© != this) { - type = copy.type; - memcpy(&id, ©.id, sizeof(id)); - } + PortID(PortID&& id) = default; + PortID& operator=(PortID&& id) = default; - return *this; - } + ~PortID() = default; Type type = Type::nothing; -- cgit v1.2.1