Skip to content

Commit

Permalink
Refine: move modify logic for updateList to 'update'
Browse files Browse the repository at this point in the history
  • Loading branch information
bofeng-song committed Feb 18, 2025
1 parent 41d8447 commit 9651f68
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions native/cocos/editor-support/MiddlewareManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,16 @@ void MiddlewareManager::update(float dt) {
auto *editor = _updateList[i];
editor->update(dt);
}
}

void MiddlewareManager::render(float dt) {
for (auto &iter: _operateCacheMap) {
auto it = std::find(_updateList.begin(), _updateList.end(), iter.first);
if (!iter.second && it != _updateList.end()) {
_updateList.erase(it);
}
}
}

void MiddlewareManager::render(float dt) {
for (auto it : _mbMap) {
auto *buffer = it.second;
if (buffer) {
Expand Down

0 comments on commit 9651f68

Please sign in to comment.