[core] Convert entity vectors to static allocation for reduced memory usage (#10018)

This commit is contained in:
J. Nick Koston authored and GitHub committed 2025-08-01 20:26:22 -10:00
1 parent 00d9baed11
commit 4f58e1c8b9
6 files changed
+118 -124

No files matched your search

-13
View File
@@ -17,19 +17,6 @@ void ComponentIterator::begin(bool include_internal) {
this->include_internal_ = include_internal;
}
template<typename PlatformItem>
void ComponentIterator::process_platform_item_(const std::vector<PlatformItem *> &items,
bool (ComponentIterator::*on_item)(PlatformItem *)) {
if (this->at_ >= items.size()) {
this->advance_platform_();
} else {
PlatformItem *item = items[this->at_];
if ((item->is_internal() && !this->include_internal_) || (this->*on_item)(item)) {
this->at_++;
}
}
}
void ComponentIterator::advance_platform_() {
this->state_ = static_cast<IteratorState>(static_cast<uint32_t>(this->state_) + 1);
this->at_ = 0;