diff --git a/esphome/components/climate/climate_mode_bitmask.h b/esphome/components/climate/climate_mode_bitmask.h index 4166829c3f..d04e7b6ec7 100644 --- a/esphome/components/climate/climate_mode_bitmask.h +++ b/esphome/components/climate/climate_mode_bitmask.h @@ -3,8 +3,7 @@ #include "esphome/core/enum_bitmask.h" #include "climate_mode.h" -namespace esphome { -namespace climate { +namespace esphome::climate { // Type aliases for climate enum bitmasks // These replace std::set to eliminate red-black tree overhead @@ -21,8 +20,7 @@ using ClimateFanModeMask = EnumBitmask; using ClimatePresetMask = EnumBitmask; -} // namespace climate -} // namespace esphome +} // namespace esphome::climate // Template specializations for enum-to-bit conversions // All climate enums are sequential starting from 0, so conversions are trivial diff --git a/esphome/components/climate/climate_traits.h b/esphome/components/climate/climate_traits.h index 238c527981..1aef00956b 100644 --- a/esphome/components/climate/climate_traits.h +++ b/esphome/components/climate/climate_traits.h @@ -5,8 +5,7 @@ #include "climate_mode_bitmask.h" #include "esphome/core/helpers.h" -namespace esphome { -namespace climate { +namespace esphome::climate { // Lightweight linear search for small vectors (1-20 items) // Avoids std::find template overhead @@ -18,8 +17,7 @@ template inline bool vector_contains(const std::vector &vec, cons return false; } -} // namespace climate -} // namespace esphome +} // namespace esphome::climate namespace esphome {