From 42d2c149d6fff2521e31cd580acf8114aaabce68 Mon Sep 17 00:00:00 2001 From: David Robillard <d@drobilla.net> Date: Fri, 27 Nov 2020 17:57:47 +0100 Subject: Initialize all members --- src/PortID.hpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/PortID.hpp') diff --git a/src/PortID.hpp b/src/PortID.hpp index d830c0c..3dea5af 100644 --- a/src/PortID.hpp +++ b/src/PortID.hpp @@ -40,11 +40,7 @@ struct PortID alsa_addr, }; - PortID() - : type(Type::nothing) - { - memset(&id, 0, sizeof(id)); - } + PortID() = default; PortID(const PortID& copy) : type(copy.type) @@ -69,7 +65,7 @@ struct PortID } #endif - Type type; + Type type = Type::nothing; union { @@ -83,7 +79,7 @@ struct PortID bool is_input : 1; }; #endif - } id; + } id = {}; }; static inline std::ostream& -- cgit v1.2.1