1
0
mirror of https://github.com/esphome/esphome.git synced 2025-09-24 06:02:21 +01:00

remove duplication from component_iterator (#7210)

Co-authored-by: Samuel Tardieu <sam@rfc1149.net>
Co-authored-by: J. Nick Koston <nick@koston.org>
This commit is contained in:
tomaszduda23
2025-07-16 03:02:14 +02:00
committed by GitHub
parent 5d9cba3dce
commit 6ab3de65a6
3 changed files with 81 additions and 261 deletions

View File

@@ -171,6 +171,11 @@ class ComponentIterator {
} state_{IteratorState::NONE};
uint16_t at_{0}; // Supports up to 65,535 entities per type
bool include_internal_{false};
template<typename PlatformItem>
void process_platform_item_(const std::vector<PlatformItem *> &items,
bool (ComponentIterator::*on_item)(PlatformItem *));
void advance_platform_();
};
} // namespace esphome