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

Unified Diff: ui/compositor/layer_animator.cc

Issue 2550933002: Make all LayerAnimationElement::Create*Element return unique_ptr (Closed)
Patch Set: Complete inclusion Created 4 years 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
Index: ui/compositor/layer_animator.cc
diff --git a/ui/compositor/layer_animator.cc b/ui/compositor/layer_animator.cc
index 72ca40d0424c3994295773506ccc828c22867c6a..141e7dd18bad6b16bfc4f7ad73f66fa8c27c6fa5 100644
--- a/ui/compositor/layer_animator.cc
+++ b/ui/compositor/layer_animator.cc
@@ -94,10 +94,10 @@ LayerAnimator* LayerAnimator::CreateImplicitAnimator() {
delegate()->Set##name##FromAnimation(value); \
return; \
} \
- std::unique_ptr<LayerAnimationElement> element( \
- LayerAnimationElement::Create##name##Element(value, duration)); \
+ std::unique_ptr<LayerAnimationElement> element = \
+ LayerAnimationElement::Create##name##Element(value, duration); \
element->set_tween_type(tween_type_); \
- StartAnimation(new LayerAnimationSequence(element.release())); \
+ StartAnimation(new LayerAnimationSequence(std::move(element))); \
} \
\
member_type LayerAnimator::GetTarget##name() const { \

Powered by Google App Engine
This is Rietveld 408576698