diff options
-rw-r--r-- | src/PortID.hpp | 22 | ||||
-rw-r--r-- | wscript | 1 |
2 files changed, 16 insertions, 7 deletions
diff --git a/src/PortID.hpp b/src/PortID.hpp index 054008f..8132639 100644 --- a/src/PortID.hpp +++ b/src/PortID.hpp @@ -42,12 +42,6 @@ struct PortID PortID() = default; - PortID(const PortID& copy) - : type(copy.type) - { - memcpy(&id, ©.id, sizeof(id)); - } - #ifdef PATCHAGE_LIBJACK explicit PortID(jack_port_id_t jack_id, bool = false) : type(Type::jack_id) @@ -65,6 +59,22 @@ struct PortID } #endif + PortID(const PortID& copy) + : type(copy.type) + { + memcpy(&id, ©.id, sizeof(id)); + } + + PortID& operator=(const PortID& copy) + { + if (© != this) { + type = copy.type; + memcpy(&id, ©.id, sizeof(id)); + } + + return *this; + } + Type type = Type::nothing; union @@ -101,7 +101,6 @@ def configure(conf): autowaf.add_compiler_flags(conf.env, 'cxx', { 'clang': [ - '-Wno-deprecated-copy', '-Wno-old-style-cast', '-Wno-weak-vtables', ], |