Index: ui/compositor/layer.cc |
diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc |
index f3551f7687babb3d1914b669ca8e32686491ddfb..8e49ccb117ddd670c97379688bec96460a0aeeb7 100644 |
--- a/ui/compositor/layer.cc |
+++ b/ui/compositor/layer.cc |
@@ -659,10 +659,14 @@ void Layer::SendDamagedRects() { |
} |
void Layer::CompleteAllAnimations() { |
- std::vector<scoped_refptr<LayerAnimator> > animators; |
+ typedef std::vector<scoped_refptr<LayerAnimator> > LayerAnimatorVector; |
+ LayerAnimatorVector animators; |
CollectAnimators(&animators); |
- std::for_each(animators.begin(), animators.end(), |
- std::mem_fun(&LayerAnimator::StopAnimating)); |
danakj
2014/08/28 16:50:42
isn't mem_fun going to deref the iterator also? wh
dcheng
2014/08/28 17:21:18
I believe mem_fun actually expects a pointer. for_
|
+ for (LayerAnimatorVector::const_iterator it = animators.begin(); |
+ it != animators.end(); |
+ ++it) { |
+ (*it)->StopAnimating(); |
+ } |
} |
void Layer::SuppressPaint() { |