1
0
mirror of https://github.com/esphome/esphome.git synced 2025-10-18 09:43:47 +01:00
This commit is contained in:
J. Nick Koston
2025-10-13 19:06:02 -10:00
parent 45014db027
commit fc30326e60

View File

@@ -208,11 +208,11 @@ template<typename T> 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_();
}