diff --git a/esphome/core/helpers.h b/esphome/core/helpers.h index a9c0427917..b94826629f 100644 --- a/esphome/core/helpers.h +++ b/esphome/core/helpers.h @@ -208,11 +208,11 @@ template class FixedVector { ~FixedVector() { cleanup_(); } - // Disable copy operations - use std::move() to transfer ownership + // Disable copy operations (avoid accidental expensive copies) FixedVector(const FixedVector &) = delete; FixedVector &operator=(const FixedVector &) = delete; - // Enable move semantics + // Enable move semantics (allows use in move-only containers like std::vector) FixedVector(FixedVector &&other) noexcept : data_(other.data_), size_(other.size_), capacity_(other.capacity_) { other.reset_(); }