Commit 68bd5080631f710bc080d9cf3ccb8d49f5783460

Authored by Wiebe Cazemier
1 parent 462fb2ed

Make sure MqttPacket copy constructor is not used

Showing 1 changed file with 3 additions and 0 deletions
mqttpacket.h
@@ -47,6 +47,9 @@ public: @@ -47,6 +47,9 @@ public:
47 PacketType packetType = PacketType::Reserved; 47 PacketType packetType = PacketType::Reserved;
48 MqttPacket(CirBuf &buf, size_t packet_len, size_t fixed_header_length, Client_p &sender); // Constructor for parsing incoming packets. 48 MqttPacket(CirBuf &buf, size_t packet_len, size_t fixed_header_length, Client_p &sender); // Constructor for parsing incoming packets.
49 49
  50 + MqttPacket(MqttPacket &&other) = default;
  51 + MqttPacket(const MqttPacket &other) = delete;
  52 +
50 // Constructor for outgoing packets. These may not allocate room for the fixed header, because we don't (always) know the length in advance. 53 // Constructor for outgoing packets. These may not allocate room for the fixed header, because we don't (always) know the length in advance.
51 MqttPacket(const ConnAck &connAck); 54 MqttPacket(const ConnAck &connAck);
52 MqttPacket(const SubAck &subAck); 55 MqttPacket(const SubAck &subAck);