@@ -1659,11 +1659,13 @@ bool parseStringAndSendAirCon(IRsend *irsend, const decode_type_t irType,
1659
1659
stateSize = inputLength / 2 ; // Every two hex chars is a byte.
1660
1660
// Use at least the minimum size.
1661
1661
stateSize = std::max (stateSize,
1662
- (uint16_t ) (kFujitsuAcStateLengthShort - 1 ));
1662
+ static_cast <uint16_t >(kFujitsuAcStateLengthShort -
1663
+ 1 ));
1663
1664
// If we think it isn't a "short" message.
1664
1665
if (stateSize > kFujitsuAcStateLengthShort )
1665
1666
// Then it has to be at least the smaller version of the "normal" size.
1666
- stateSize = std::max (stateSize, (uint16_t ) (kFujitsuAcStateLength - 1 ));
1667
+ stateSize = std::max (stateSize,
1668
+ static_cast <uint16_t >(kFujitsuAcStateLength - 1 ));
1667
1669
// Lastly, it should never exceed the maximum "normal" size.
1668
1670
stateSize = std::min (stateSize, kFujitsuAcStateLength );
1669
1671
break ;
@@ -1675,12 +1677,12 @@ bool parseStringAndSendAirCon(IRsend *irsend, const decode_type_t irType,
1675
1677
stateSize = inputLength / 2 ; // Every two hex chars is a byte.
1676
1678
// Use at least the minimum size.
1677
1679
stateSize = std::max (stateSize,
1678
- ( uint16_t ) (kHitachiAc3MinStateLength ));
1680
+ static_cast < uint16_t > (kHitachiAc3MinStateLength ));
1679
1681
// If we think it isn't a "short" message.
1680
1682
if (stateSize > kHitachiAc3MinStateLength )
1681
1683
// Then it probably the "normal" size.
1682
1684
stateSize = std::max (stateSize,
1683
- ( uint16_t ) (kHitachiAc3StateLength ));
1685
+ static_cast < uint16_t > (kHitachiAc3StateLength ));
1684
1686
// Lastly, it should never exceed the maximum "normal" size.
1685
1687
stateSize = std::min (stateSize, kHitachiAc3StateLength );
1686
1688
break ;
@@ -1691,7 +1693,7 @@ bool parseStringAndSendAirCon(IRsend *irsend, const decode_type_t irType,
1691
1693
// the correct length/byte size.
1692
1694
stateSize = inputLength / 2 ; // Every two hex chars is a byte.
1693
1695
// Use at least the minimum size.
1694
- stateSize = std::max (stateSize, ( uint16_t ) 3 );
1696
+ stateSize = std::max (stateSize, static_cast < uint16_t >( 3 ) );
1695
1697
// Cap the maximum size.
1696
1698
stateSize = std::min (stateSize, kStateSizeMax );
1697
1699
break ;
@@ -1702,12 +1704,13 @@ bool parseStringAndSendAirCon(IRsend *irsend, const decode_type_t irType,
1702
1704
// the correct length/byte size.
1703
1705
stateSize = inputLength / 2 ; // Every two hex chars is a byte.
1704
1706
// Use at least the minimum size.
1705
- stateSize = std::max (stateSize, (uint16_t ) (kSamsungAcStateLength ));
1707
+ stateSize = std::max (stateSize,
1708
+ static_cast <uint16_t >(kSamsungAcStateLength ));
1706
1709
// If we think it isn't a "normal" message.
1707
1710
if (stateSize > kSamsungAcStateLength )
1708
1711
// Then it probably the extended size.
1709
- stateSize = std::max (stateSize,
1710
- ( uint16_t ) (kSamsungAcExtendedStateLength ));
1712
+ stateSize = std::max (
1713
+ stateSize, static_cast < uint16_t > (kSamsungAcExtendedStateLength ));
1711
1714
// Lastly, it should never exceed the maximum "extended" size.
1712
1715
stateSize = std::min (stateSize, kSamsungAcExtendedStateLength );
1713
1716
break ;
@@ -2671,7 +2674,8 @@ void receivingMQTT(String const topic_name, String const callback_str) {
2671
2674
switch (ircommand[0 ]) {
2672
2675
case kPauseChar :
2673
2676
{ // It's a pause. Everything after the 'P' should be a number.
2674
- int32_t msecs = std::min ((int32_t ) strtoul (ircommand + 1 , NULL , 10 ),
2677
+ int32_t msecs = std::min (static_cast <int32_t >(strtoul (ircommand + 1 ,
2678
+ NULL , 10 )),
2675
2679
kMaxPauseMs );
2676
2680
delay (msecs);
2677
2681
mqtt_client.publish (MqttAck.c_str (),
0 commit comments