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