Update esphome/core/component_iterator.cpp

Co-authored-by: Samuel Tardieu <sam@rfc1149.net>
This commit is contained in:
tomaszduda23 2024-08-07 16:59:39 +02:00 committed by GitHub
parent 45693ac5fc
commit 42af4ebb34
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,7 +19,7 @@ template<typename Entity>
void ComponentIterator::process_entity_(const std::vector<Entity *> &items, void ComponentIterator::process_entity_(const std::vector<Entity *> &items,
bool (ComponentIterator::*on_item)(Entity *)) { bool (ComponentIterator::*on_item)(Entity *)) {
if (this->at_ >= items.size()) { if (this->at_ >= items.size()) {
advance_platform_(); this->advance_platform_();
} else { } else {
Entity *entity = items[this->at_]; Entity *entity = items[this->at_];
if (entity->is_internal() && !this->include_internal_) { if (entity->is_internal() && !this->include_internal_) {