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

Unified Diff: third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.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/CSSLengthInterpolationType.cpp
diff --git a/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp b/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp
index 4fad24c407230df54d72e7846adadad5fbd33bf0..4ee49846096e33b98feca795eddd590a2619dc0f 100644
--- a/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp
+++ b/third_party/WebKit/Source/core/animation/CSSLengthInterpolationType.cpp
@@ -56,14 +56,14 @@ PassOwnPtr<InterpolableValue> CSSLengthInterpolationType::createInterpolablePixe
{
OwnPtr<InterpolableList> interpolableList = createNeutralInterpolableValue();
interpolableList->set(CSSPrimitiveValue::UnitTypePixels, InterpolableNumber::create(pixels));
- return interpolableList.release();
+ return std::move(interpolableList);
}
InterpolationValue CSSLengthInterpolationType::createInterpolablePercent(double percent)
{
OwnPtr<InterpolableList> interpolableList = createNeutralInterpolableValue();
interpolableList->set(CSSPrimitiveValue::UnitTypePercentage, InterpolableNumber::create(percent));
- return InterpolationValue(interpolableList.release(), CSSLengthNonInterpolableValue::create(true));
+ return InterpolationValue(std::move(interpolableList), CSSLengthNonInterpolableValue::create(true));
}
InterpolationValue CSSLengthInterpolationType::maybeConvertLength(const Length& length, float zoom)
@@ -76,7 +76,7 @@ InterpolationValue CSSLengthInterpolationType::maybeConvertLength(const Length&
values->set(CSSPrimitiveValue::UnitTypePixels, InterpolableNumber::create(pixelsAndPercent.pixels / zoom));
values->set(CSSPrimitiveValue::UnitTypePercentage, InterpolableNumber::create(pixelsAndPercent.percent));
- return InterpolationValue(values.release(), CSSLengthNonInterpolableValue::create(length.hasPercent()));
+ return InterpolationValue(std::move(values), CSSLengthNonInterpolableValue::create(length.hasPercent()));
}
PassOwnPtr<InterpolableList> CSSLengthInterpolationType::createNeutralInterpolableValue()
@@ -85,14 +85,14 @@ PassOwnPtr<InterpolableList> CSSLengthInterpolationType::createNeutralInterpolab
OwnPtr<InterpolableList> values = InterpolableList::create(length);
for (size_t i = 0; i < length; i++)
values->set(i, InterpolableNumber::create(0));
- return values.release();
+ return values;
}
PairwiseInterpolationValue CSSLengthInterpolationType::staticMergeSingleConversions(InterpolationValue&& start, InterpolationValue&& end)
{
return PairwiseInterpolationValue(
- start.interpolableValue.release(),
- end.interpolableValue.release(),
+ std::move(start.interpolableValue),
+ std::move(end.interpolableValue),
CSSLengthNonInterpolableValue::merge(start.nonInterpolableValue.get(), end.nonInterpolableValue.get()));
}
@@ -141,7 +141,7 @@ InterpolationValue CSSLengthInterpolationType::maybeConvertCSSValue(const CSSVal
values->set(i, InterpolableNumber::create(lengthArray.values[i]));
bool hasPercentage = lengthArray.typeFlags.get(CSSPrimitiveValue::UnitTypePercentage);
- return InterpolationValue(values.release(), CSSLengthNonInterpolableValue::create(hasPercentage));
+ return InterpolationValue(std::move(values), CSSLengthNonInterpolableValue::create(hasPercentage));
}
class ParentLengthChecker : public InterpolationType::ConversionChecker {

Powered by Google App Engine
This is Rietveld 408576698