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

Unified Diff: third_party/WebKit/Source/core/animation/CSSColorInterpolationType.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/CSSColorInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/CSSColorInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSColorInterpolationType.cpp
index 318df27deaac3769489c1ce21f90933f2071f018..e8c09fa5f089f61604c1d7336ac7bbb7a0c190e8 100644
--- a/third_party/WebKit/Source/core/animation/CSSColorInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSColorInterpolationType.cpp
@@ -30,7 +30,7 @@ static PassOwnPtr<InterpolableValue> createInterpolableColorForIndex(Interpolabl
OwnPtr<InterpolableList> list = InterpolableList::create(InterpolableColorIndexCount);
for (int i = 0; i < InterpolableColorIndexCount; i++)
list->set(i, InterpolableNumber::create(i == index));
- return list.release();
+ return std::move(list);
}
PassOwnPtr<InterpolableValue> CSSColorInterpolationType::createInterpolableColor(const Color& color)
@@ -44,7 +44,7 @@ PassOwnPtr<InterpolableValue> CSSColorInterpolationType::createInterpolableColor
list->set(WebkitActivelink, InterpolableNumber::create(0));
list->set(WebkitLink, InterpolableNumber::create(0));
list->set(QuirkInherit, InterpolableNumber::create(0));
- return list.release();
+ return std::move(list);
}
PassOwnPtr<InterpolableValue> CSSColorInterpolationType::createInterpolableColor(CSSValueID keyword)
@@ -193,8 +193,8 @@ InterpolationValue CSSColorInterpolationType::maybeConvertValue(const CSSValue&
return nullptr;
OwnPtr<InterpolableList> colorPair = InterpolableList::create(InterpolableColorPairIndexCount);
colorPair->set(Unvisited, interpolableColor->clone());
- colorPair->set(Visited, interpolableColor.release());
- return InterpolationValue(colorPair.release());
+ colorPair->set(Visited, std::move(interpolableColor));
+ return InterpolationValue(std::move(colorPair));
}
InterpolationValue CSSColorInterpolationType::convertStyleColorPair(const StyleColor& unvisitedColor, const StyleColor& visitedColor) const
@@ -202,7 +202,7 @@ InterpolationValue CSSColorInterpolationType::convertStyleColorPair(const StyleC
OwnPtr<InterpolableList> colorPair = InterpolableList::create(InterpolableColorPairIndexCount);
colorPair->set(Unvisited, createInterpolableColor(unvisitedColor));
colorPair->set(Visited, createInterpolableColor(visitedColor));
- return InterpolationValue(colorPair.release());
+ return InterpolationValue(std::move(colorPair));
}
InterpolationValue CSSColorInterpolationType::maybeConvertUnderlyingValue(const InterpolationEnvironment& environment) const

Powered by Google App Engine
This is Rietveld 408576698