Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(421)

Unified Diff: views/view.cc

Issue 7104096: views: Simplify View::RemoveAllChildViews() function implementation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | views/view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/view.cc
diff --git a/views/view.cc b/views/view.cc
index 3c4183f092950ba41dbe673df2b15041d6b85fc6..7ed2ac87415a07721bc34bfed7f21735982a4586 100644
--- a/views/view.cc
+++ b/views/view.cc
@@ -187,9 +187,8 @@ void View::RemoveChildView(View* view) {
}
void View::RemoveAllChildViews(bool delete_children) {
- Views::iterator iter;
- while ((iter = children_.begin()) != children_.end())
- DoRemoveChildView(*iter, false, false, delete_children);
+ while (!children_.empty())
+ DoRemoveChildView(children_.front(), false, false, delete_children);
UpdateTooltip();
}
« no previous file with comments | « no previous file | views/view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698