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

Unified Diff: cc/test/animation_timelines_test_common.cc

Issue 2340923003: CC Animation: Rework iterations over players to use the range-based for loop. (Closed)
Patch Set: Rebase. Created 4 years, 2 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 | « cc/test/animation_test_common.cc ('k') | cc/trees/layer_tree_host_unittest_animation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/test/animation_timelines_test_common.cc
diff --git a/cc/test/animation_timelines_test_common.cc b/cc/test/animation_timelines_test_common.cc
index 54c59a613f7458e461a6bdb2c1e4fa49d8b4338a..814a79389fc897a8b2a3b1e7e3acbdaa7444e90d 100644
--- a/cc/test/animation_timelines_test_common.cc
+++ b/cc/test/animation_timelines_test_common.cc
@@ -438,22 +438,16 @@ AnimationPlayer* AnimationTimelinesTest::GetPlayerForElementId(
ElementId element_id) {
const scoped_refptr<ElementAnimations> element_animations =
host_->GetElementAnimationsForElementId(element_id);
- return element_animations
- ? ElementAnimations::PlayersList::Iterator(
- &element_animations->players_list())
- .GetNext()
- : nullptr;
+ return element_animations ? &*element_animations->players_list().begin()
+ : nullptr;
}
AnimationPlayer* AnimationTimelinesTest::GetImplPlayerForLayerId(
ElementId element_id) {
const scoped_refptr<ElementAnimations> element_animations =
host_impl_->GetElementAnimationsForElementId(element_id);
- return element_animations
- ? ElementAnimations::PlayersList::Iterator(
- &element_animations->players_list())
- .GetNext()
- : nullptr;
+ return element_animations ? &*element_animations->players_list().begin()
+ : nullptr;
}
int AnimationTimelinesTest::NextTestLayerId() {
« no previous file with comments | « cc/test/animation_test_common.cc ('k') | cc/trees/layer_tree_host_unittest_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698