mirror of
https://github.com/esphome/esphome.git
synced 2024-12-28 16:31:44 +01:00
fix clang tidy
This commit is contained in:
parent
4a0a14635a
commit
0c0a972c5e
2 changed files with 4 additions and 4 deletions
|
@ -168,21 +168,21 @@ class ClimateTraits {
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void set_mode_support_(climate::ClimateMode mode, bool supported) {
|
void set_mode_support_(climate::ClimateMode mode, bool supported) {
|
||||||
if (supported) {
|
if (supported) { // NOLINT(bugprone-branch-clone)
|
||||||
supported_modes_.insert(mode);
|
supported_modes_.insert(mode);
|
||||||
} else {
|
} else {
|
||||||
supported_modes_.erase(mode);
|
supported_modes_.erase(mode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void set_fan_mode_support_(climate::ClimateFanMode mode, bool supported) {
|
void set_fan_mode_support_(climate::ClimateFanMode mode, bool supported) {
|
||||||
if (supported) {
|
if (supported) { // NOLINT(bugprone-branch-clone)
|
||||||
supported_fan_modes_.insert(mode);
|
supported_fan_modes_.insert(mode);
|
||||||
} else {
|
} else {
|
||||||
supported_fan_modes_.erase(mode);
|
supported_fan_modes_.erase(mode);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
void set_swing_mode_support_(climate::ClimateSwingMode mode, bool supported) {
|
void set_swing_mode_support_(climate::ClimateSwingMode mode, bool supported) {
|
||||||
if (supported) {
|
if (supported) { // NOLINT(bugprone-branch-clone)
|
||||||
supported_swing_modes_.insert(mode);
|
supported_swing_modes_.insert(mode);
|
||||||
} else {
|
} else {
|
||||||
supported_swing_modes_.erase(mode);
|
supported_swing_modes_.erase(mode);
|
||||||
|
|
|
@ -215,7 +215,7 @@ uint32_t random_uint32() {
|
||||||
std::uniform_int_distribution<uint32_t> dist(0, std::numeric_limits<uint32_t>::max());
|
std::uniform_int_distribution<uint32_t> dist(0, std::numeric_limits<uint32_t>::max());
|
||||||
return dist(rng);
|
return dist(rng);
|
||||||
#elif defined(USE_ZEPHYR)
|
#elif defined(USE_ZEPHYR)
|
||||||
return rand();
|
return rand(); // NOLINT(cert-msc30-c,cert-msc50-cpp)
|
||||||
#else
|
#else
|
||||||
#error "No random source available for this configuration."
|
#error "No random source available for this configuration."
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue