@@ -1659,11 +1659,13 @@ bool parseStringAndSendAirCon(IRsend *irsend, const decode_type_t irType,
16591659 stateSize = inputLength / 2 ; // Every two hex chars is a byte.
16601660 // Use at least the minimum size.
16611661 stateSize = std::max (stateSize,
1662- (uint16_t ) (kFujitsuAcStateLengthShort - 1 ));
1662+ static_cast <uint16_t >(kFujitsuAcStateLengthShort -
1663+ 1 ));
16631664 // If we think it isn't a "short" message.
16641665 if (stateSize > kFujitsuAcStateLengthShort )
16651666 // 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 ));
16671669 // Lastly, it should never exceed the maximum "normal" size.
16681670 stateSize = std::min (stateSize, kFujitsuAcStateLength );
16691671 break ;
@@ -1675,12 +1677,12 @@ bool parseStringAndSendAirCon(IRsend *irsend, const decode_type_t irType,
16751677 stateSize = inputLength / 2 ; // Every two hex chars is a byte.
16761678 // Use at least the minimum size.
16771679 stateSize = std::max (stateSize,
1678- ( uint16_t ) (kHitachiAc3MinStateLength ));
1680+ static_cast < uint16_t > (kHitachiAc3MinStateLength ));
16791681 // If we think it isn't a "short" message.
16801682 if (stateSize > kHitachiAc3MinStateLength )
16811683 // Then it probably the "normal" size.
16821684 stateSize = std::max (stateSize,
1683- ( uint16_t ) (kHitachiAc3StateLength ));
1685+ static_cast < uint16_t > (kHitachiAc3StateLength ));
16841686 // Lastly, it should never exceed the maximum "normal" size.
16851687 stateSize = std::min (stateSize, kHitachiAc3StateLength );
16861688 break ;
@@ -1691,7 +1693,7 @@ bool parseStringAndSendAirCon(IRsend *irsend, const decode_type_t irType,
16911693 // the correct length/byte size.
16921694 stateSize = inputLength / 2 ; // Every two hex chars is a byte.
16931695 // Use at least the minimum size.
1694- stateSize = std::max (stateSize, ( uint16_t ) 3 );
1696+ stateSize = std::max (stateSize, static_cast < uint16_t >( 3 ) );
16951697 // Cap the maximum size.
16961698 stateSize = std::min (stateSize, kStateSizeMax );
16971699 break ;
@@ -1702,12 +1704,13 @@ bool parseStringAndSendAirCon(IRsend *irsend, const decode_type_t irType,
17021704 // the correct length/byte size.
17031705 stateSize = inputLength / 2 ; // Every two hex chars is a byte.
17041706 // 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 ));
17061709 // If we think it isn't a "normal" message.
17071710 if (stateSize > kSamsungAcStateLength )
17081711 // 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 ));
17111714 // Lastly, it should never exceed the maximum "extended" size.
17121715 stateSize = std::min (stateSize, kSamsungAcExtendedStateLength );
17131716 break ;
@@ -2671,7 +2674,8 @@ void receivingMQTT(String const topic_name, String const callback_str) {
26712674 switch (ircommand[0 ]) {
26722675 case kPauseChar :
26732676 { // 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 )),
26752679 kMaxPauseMs );
26762680 delay (msecs);
26772681 mqtt_client.publish (MqttAck.c_str (),
0 commit comments