From 9651f68f14a074f5b11e6724f7587702dbaed84f Mon Sep 17 00:00:00 2001 From: bofeng Date: Tue, 18 Feb 2025 10:11:12 +0800 Subject: [PATCH] Refine: move modify logic for updateList to 'update' --- native/cocos/editor-support/MiddlewareManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/native/cocos/editor-support/MiddlewareManager.cpp b/native/cocos/editor-support/MiddlewareManager.cpp index ed5fcc24702..3bca8ddb589 100644 --- a/native/cocos/editor-support/MiddlewareManager.cpp +++ b/native/cocos/editor-support/MiddlewareManager.cpp @@ -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) {