diff --git a/src/jazzlights/network/network.h b/src/jazzlights/network/network.h index 93c9aba..e9ae1b4 100644 --- a/src/jazzlights/network/network.h +++ b/src/jazzlights/network/network.h @@ -109,6 +109,12 @@ std::string networkMessageToString(const NetworkMessage& message, Milliseconds c class Network { public: + // Disallow copy and move. + Network(const Network&) = delete; + Network(Network&&) = delete; + Network& operator=(const Network&) = delete; + Network& operator=(Network&&) = delete; + virtual ~Network() = default; // Set message to send during next send opportunity. @@ -186,10 +192,6 @@ class Network { class UdpNetwork : public Network { public: - UdpNetwork() = default; - ~UdpNetwork() = default; - UdpNetwork(const UdpNetwork&) = default; - void setMessageToSend(const NetworkMessage& messageToSend, Milliseconds currentTime) override; void disableSending(Milliseconds currentTime) override; void triggerSendAsap(Milliseconds currentTime) override; diff --git a/src/jazzlights/network/unix_udp.h b/src/jazzlights/network/unix_udp.h index efe9bca..88b6c29 100644 --- a/src/jazzlights/network/unix_udp.h +++ b/src/jazzlights/network/unix_udp.h @@ -15,7 +15,6 @@ namespace jazzlights { class UnixUdpNetwork : public UdpNetwork { public: UnixUdpNetwork(uint16_t port = DefaultUdpPort(), const char* addr = DefaultMulticastAddress()); - UnixUdpNetwork(const UnixUdpNetwork&) = default; NetworkStatus update(NetworkStatus status, Milliseconds currentTime) override; NetworkDeviceId getLocalDeviceId() override { return localDeviceId_; }