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

Unified Diff: Source/core/svg/SVGFEConvolveMatrixElement.cpp

Issue 170603003: Use nullptr_t for RefPtr, PassRefPtr and RawPtr. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Final rebase Created 6 years, 10 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
« no previous file with comments | « Source/core/svg/SVGFECompositeElement.cpp ('k') | Source/core/svg/SVGFEDiffuseLightingElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGFEConvolveMatrixElement.cpp
diff --git a/Source/core/svg/SVGFEConvolveMatrixElement.cpp b/Source/core/svg/SVGFEConvolveMatrixElement.cpp
index 024db744074494b459a75778a66e29ce6ab2ff7f..12822241bd5577aa8dbdde6bfd14d3242e2cc1e9 100644
--- a/Source/core/svg/SVGFEConvolveMatrixElement.cpp
+++ b/Source/core/svg/SVGFEConvolveMatrixElement.cpp
@@ -198,7 +198,7 @@ PassRefPtr<FilterEffect> SVGFEConvolveMatrixElement::build(SVGFilterBuilder* fil
FilterEffect* input1 = filterBuilder->getEffectById(AtomicString(m_in1->currentValue()->value()));
if (!input1)
- return 0;
+ return nullptr;
int orderXValue = orderX()->currentValue()->value();
int orderYValue = orderY()->currentValue()->value();
@@ -208,22 +208,22 @@ PassRefPtr<FilterEffect> SVGFEConvolveMatrixElement::build(SVGFilterBuilder* fil
}
// Spec says order must be > 0. Bail if it is not.
if (orderXValue < 1 || orderYValue < 1)
- return 0;
+ return nullptr;
RefPtr<SVGNumberList> kernelMatrix = this->m_kernelMatrix->currentValue();
size_t kernelMatrixSize = kernelMatrix->numberOfItems();
// The spec says this is a requirement, and should bail out if fails
if (orderXValue * orderYValue != static_cast<int>(kernelMatrixSize))
- return 0;
+ return nullptr;
int targetXValue = m_targetX->currentValue()->value();
int targetYValue = m_targetY->currentValue()->value();
if (hasAttribute(SVGNames::targetXAttr) && (targetXValue < 0 || targetXValue >= orderXValue))
- return 0;
+ return nullptr;
// The spec says the default value is: targetX = floor ( orderX / 2 ))
if (!hasAttribute(SVGNames::targetXAttr))
targetXValue = static_cast<int>(floorf(orderXValue / 2));
if (hasAttribute(SVGNames::targetYAttr) && (targetYValue < 0 || targetYValue >= orderYValue))
- return 0;
+ return nullptr;
// The spec says the default value is: targetY = floor ( orderY / 2 ))
if (!hasAttribute(SVGNames::targetYAttr))
targetYValue = static_cast<int>(floorf(orderYValue / 2));
@@ -237,11 +237,11 @@ PassRefPtr<FilterEffect> SVGFEConvolveMatrixElement::build(SVGFilterBuilder* fil
kernelUnitLengthYValue = 1;
}
if (kernelUnitLengthXValue <= 0 || kernelUnitLengthYValue <= 0)
- return 0;
+ return nullptr;
float divisorValue = m_divisor->currentValue()->value();
if (hasAttribute(SVGNames::divisorAttr) && !divisorValue)
- return 0;
+ return nullptr;
if (!hasAttribute(SVGNames::divisorAttr)) {
for (size_t i = 0; i < kernelMatrixSize; ++i)
divisorValue += kernelMatrix->at(i)->value();
« no previous file with comments | « Source/core/svg/SVGFECompositeElement.cpp ('k') | Source/core/svg/SVGFEDiffuseLightingElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698