@@ -1659,11 +1659,12 @@ 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 - 1 ));
16631663 // If we think it isn't a "short" message.
16641664 if (stateSize > kFujitsuAcStateLengthShort )
16651665 // 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 ));
16671668 // Lastly, it should never exceed the maximum "normal" size.
16681669 stateSize = std::min (stateSize, kFujitsuAcStateLength );
16691670 break ;
@@ -1675,12 +1676,12 @@ bool parseStringAndSendAirCon(IRsend *irsend, const decode_type_t irType,
16751676 stateSize = inputLength / 2 ; // Every two hex chars is a byte.
16761677 // Use at least the minimum size.
16771678 stateSize = std::max (stateSize,
1678- ( uint16_t ) (kHitachiAc3MinStateLength ));
1679+ static_cast < uint16_t > (kHitachiAc3MinStateLength ));
16791680 // If we think it isn't a "short" message.
16801681 if (stateSize > kHitachiAc3MinStateLength )
16811682 // Then it probably the "normal" size.
16821683 stateSize = std::max (stateSize,
1683- ( uint16_t ) (kHitachiAc3StateLength ));
1684+ static_cast < uint16_t > (kHitachiAc3StateLength ));
16841685 // Lastly, it should never exceed the maximum "normal" size.
16851686 stateSize = std::min (stateSize, kHitachiAc3StateLength );
16861687 break ;
@@ -1691,7 +1692,7 @@ bool parseStringAndSendAirCon(IRsend *irsend, const decode_type_t irType,
16911692 // the correct length/byte size.
16921693 stateSize = inputLength / 2 ; // Every two hex chars is a byte.
16931694 // Use at least the minimum size.
1694- stateSize = std::max (stateSize, ( uint16_t ) 3 );
1695+ stateSize = std::max (stateSize, static_cast < uint16_t >( 3 ) );
16951696 // Cap the maximum size.
16961697 stateSize = std::min (stateSize, kStateSizeMax );
16971698 break ;
@@ -1702,12 +1703,12 @@ bool parseStringAndSendAirCon(IRsend *irsend, const decode_type_t irType,
17021703 // the correct length/byte size.
17031704 stateSize = inputLength / 2 ; // Every two hex chars is a byte.
17041705 // Use at least the minimum size.
1705- stateSize = std::max (stateSize, ( uint16_t ) (kSamsungAcStateLength ));
1706+ stateSize = std::max (stateSize, static_cast < uint16_t > (kSamsungAcStateLength ));
17061707 // If we think it isn't a "normal" message.
17071708 if (stateSize > kSamsungAcStateLength )
17081709 // Then it probably the extended size.
17091710 stateSize = std::max (stateSize,
1710- ( uint16_t ) (kSamsungAcExtendedStateLength ));
1711+ static_cast < uint16_t > (kSamsungAcExtendedStateLength ));
17111712 // Lastly, it should never exceed the maximum "extended" size.
17121713 stateSize = std::min (stateSize, kSamsungAcExtendedStateLength );
17131714 break ;
@@ -2671,7 +2672,8 @@ void receivingMQTT(String const topic_name, String const callback_str) {
26712672 switch (ircommand[0 ]) {
26722673 case kPauseChar :
26732674 { // 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 )),
26752677 kMaxPauseMs );
26762678 delay (msecs);
26772679 mqtt_client.publish (MqttAck.c_str (),
0 commit comments