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

Unified Diff: third_party/WebKit/Source/core/animation/InterpolableValueTest.cpp

Issue 1977763002: Remove OwnPtr::release() calls in core/ (part 1). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove static_pointer_cast<>s. Created 4 years, 7 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
Index: third_party/WebKit/Source/core/animation/InterpolableValueTest.cpp
diff --git a/third_party/WebKit/Source/core/animation/InterpolableValueTest.cpp b/third_party/WebKit/Source/core/animation/InterpolableValueTest.cpp
index dd15681d634518dd2b5a473f6a3f5f85e98a7e20..b65d8255fca358de900160b4fc7b7cf518574b51 100644
--- a/third_party/WebKit/Source/core/animation/InterpolableValueTest.cpp
+++ b/third_party/WebKit/Source/core/animation/InterpolableValueTest.cpp
@@ -98,7 +98,7 @@ TEST_F(AnimationInterpolableValueTest, SimpleList)
listB->set(1, InterpolableNumber::create(-200));
listB->set(2, InterpolableNumber::create(300));
- RefPtr<Interpolation> i = interpolateLists(listA.release(), listB.release(), 0.3);
+ RefPtr<Interpolation> i = interpolateLists(std::move(listA), std::move(listB), 0.3);
InterpolableList* outList = toInterpolableList(interpolationValue(*i.get()));
EXPECT_FLOAT_EQ(30, toInterpolableNumber(outList->get(0))->value());
EXPECT_FLOAT_EQ(-30.6f, toInterpolableNumber(outList->get(1))->value());
@@ -111,17 +111,17 @@ TEST_F(AnimationInterpolableValueTest, NestedList)
listA->set(0, InterpolableNumber::create(0));
OwnPtr<InterpolableList> subListA = InterpolableList::create(1);
subListA->set(0, InterpolableNumber::create(100));
- listA->set(1, subListA.release());
+ listA->set(1, std::move(subListA));
listA->set(2, InterpolableBool::create(false));
OwnPtr<InterpolableList> listB = InterpolableList::create(3);
listB->set(0, InterpolableNumber::create(100));
OwnPtr<InterpolableList> subListB = InterpolableList::create(1);
subListB->set(0, InterpolableNumber::create(50));
- listB->set(1, subListB.release());
+ listB->set(1, std::move(subListB));
listB->set(2, InterpolableBool::create(true));
- RefPtr<Interpolation> i = interpolateLists(listA.release(), listB.release(), 0.5);
+ RefPtr<Interpolation> i = interpolateLists(std::move(listA), std::move(listB), 0.5);
InterpolableList* outList = toInterpolableList(interpolationValue(*i.get()));
EXPECT_FLOAT_EQ(50, toInterpolableNumber(outList->get(0))->value());
EXPECT_FLOAT_EQ(75, toInterpolableNumber(toInterpolableList(outList->get(1))->get(0))->value());

Powered by Google App Engine
This is Rietveld 408576698