From ce14d16374cb58052afdf87f7b3932f33503a87c Mon Sep 17 00:00:00 2001 From: Wiebe Cazemier Date: Sun, 18 Sep 2022 21:52:14 +0200 Subject: [PATCH] Fix all casts from char to enum class --- mqttpacket.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/mqttpacket.cpp b/mqttpacket.cpp index 05e244d..5ab9fe8 100644 --- a/mqttpacket.cpp +++ b/mqttpacket.cpp @@ -495,7 +495,7 @@ ConnectData MqttPacket::parseConnectData() while (pos < prop_end_at) { - const Mqtt5Properties prop = static_cast(readByte()); + const Mqtt5Properties prop = static_cast(readUint8()); switch (prop) { @@ -557,7 +557,7 @@ ConnectData MqttPacket::parseConnectData() while (pos < prop_end_at) { - const Mqtt5Properties prop = static_cast(readByte()); + const Mqtt5Properties prop = static_cast(readUint8()); switch (prop) { @@ -662,7 +662,7 @@ ConnAckData MqttPacket::parseConnAckData() while (pos < prop_end_at) { - const Mqtt5Properties prop = static_cast(readByte()); + const Mqtt5Properties prop = static_cast(readUint8()); switch (prop) { @@ -866,7 +866,7 @@ AuthPacketData MqttPacket::parseAuthData() while (pos < prop_end_at) { - const Mqtt5Properties prop = static_cast(readByte()); + const Mqtt5Properties prop = static_cast(readUint8()); switch (prop) { @@ -991,7 +991,7 @@ DisconnectData MqttPacket::parseDisconnectData() while (pos < prop_end_at) { - const Mqtt5Properties prop = static_cast(readByte()); + const Mqtt5Properties prop = static_cast(readUint8()); switch (prop) { @@ -1067,7 +1067,7 @@ void MqttPacket::handleSubscribe() while (pos < prop_end_at) { - const Mqtt5Properties prop = static_cast(readByte()); + const Mqtt5Properties prop = static_cast(readUint8()); switch (prop) { @@ -1158,7 +1158,7 @@ void MqttPacket::handleUnsubscribe() while (pos < prop_end_at) { - const Mqtt5Properties prop = static_cast(readByte()); + const Mqtt5Properties prop = static_cast(readUint8()); switch (prop) { @@ -1236,7 +1236,7 @@ void MqttPacket::parsePublishData() while (pos < prop_end_at) { - const Mqtt5Properties prop = static_cast(readByte()); + const Mqtt5Properties prop = static_cast(readUint8()); switch (prop) { @@ -1403,7 +1403,7 @@ PubRecData MqttPacket::parsePubRecData() if (!atEnd()) { - result.reasonCode = static_cast(readByte()); + result.reasonCode = static_cast(readUint8()); } return result; @@ -1494,7 +1494,7 @@ SubAckData MqttPacket::parseSubAckData() while (pos < prop_end_at) { - const Mqtt5Properties prop = static_cast(readByte()); + const Mqtt5Properties prop = static_cast(readUint8()); switch (prop) { -- libgit2 0.21.4