diff --git a/cocos/ui/UILayoutComponent.cpp b/cocos/ui/UILayoutComponent.cpp index 70fa9aa57b..50a01a7d85 100644 --- a/cocos/ui/UILayoutComponent.cpp +++ b/cocos/ui/UILayoutComponent.cpp @@ -673,7 +673,7 @@ namespace ui { page->forceDoLayout(); Vector _layoutVector = page->getPages(); - for each (auto item in _layoutVector) + for(auto& item : _layoutVector) { ui::Helper::doLayout(item); }