Index: cc/animation/animation_player.cc |
diff --git a/cc/animation/animation_player.cc b/cc/animation/animation_player.cc |
index 0c380118987882b29692f850b4b8c26c8e769fcf..637f2032e0a72596e1e358ebffa300449338abe3 100644 |
--- a/cc/animation/animation_player.cc |
+++ b/cc/animation/animation_player.cc |
@@ -106,8 +106,7 @@ void AnimationPlayer::BindElementAnimations() { |
// Pass all accumulated animations to LAC. |
for (auto it = animations_.begin(); it != animations_.end(); ++it) |
danakj
2015/11/17 01:12:16
This could be
for (auto& animation : animations_)
vmpstr
2015/11/17 23:26:23
Done.
|
- element_animations_->layer_animation_controller()->AddAnimation( |
- animations_.take(it)); |
+ element_animations_->layer_animation_controller()->AddAnimation(it->Pass()); |
if (!animations_.empty()) |
SetNeedsCommit(); |
animations_.clear(); |
@@ -144,8 +143,11 @@ void AnimationPlayer::RemoveAnimation(int animation_id) { |
animation_id); |
SetNeedsCommit(); |
} else { |
- auto animations_to_remove = animations_.remove_if([animation_id]( |
- Animation* animation) { return animation->id() == animation_id; }); |
+ auto animations_to_remove = |
+ std::remove_if(animations_.begin(), animations_.end(), |
+ [animation_id](const scoped_ptr<Animation>& animation) { |
+ return animation->id() == animation_id; |
+ }); |
animations_.erase(animations_to_remove, animations_.end()); |
} |
} |