Commit 68bd5080631f710bc080d9cf3ccb8d49f5783460
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 | 47 | PacketType packetType = PacketType::Reserved; |
| 48 | 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 | 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 | 54 | MqttPacket(const ConnAck &connAck); |
| 52 | 55 | MqttPacket(const SubAck &subAck); | ... | ... |