Skip to content
  • commit-queue@webkit.org's avatar
    Get rid of bare new in SVGAnimatedColorAnimator::constructFromString() · 694a15ae
    commit-queue@webkit.org authored
    https://bugs.webkit.org/show_bug.cgi?id=124595
    
    Patch by Sergio Correia <sergio.correia@openbossa.org> on 2013-11-19
    Reviewed by Darin Adler.
    
    Use std::unique_ptr instead, to manage the arguments passed to the create
    methods of SVGAnimatedType.
    
    No new tests, covered by existing tests.
    
    * svg/SVGAnimatedAngle.cpp:
    (WebCore::SVGAnimatedAngleAnimator::constructFromString): Replace bare
    pointer with std::unique_ptr.
    * svg/SVGAnimatedBoolean.cpp:
    (WebCore::SVGAnimatedBooleanAnimator::constructFromString): Ditto.
    * svg/SVGAnimatedColor.cpp:
    (WebCore::SVGAnimatedColorAnimator::constructFromString): Ditto.
    * svg/SVGAnimatedEnumeration.cpp:
    (WebCore::SVGAnimatedEnumerationAnimator::constructFromString): Ditto.
    * svg/SVGAnimatedInteger.cpp:
    (WebCore::SVGAnimatedIntegerAnimator::constructFromString): Ditto.
    * svg/SVGAnimatedIntegerOptionalInteger.cpp:
    (WebCore::SVGAnimatedIntegerOptionalIntegerAnimator::constructFromString):
    Ditto.
    * svg/SVGAnimatedLength.cpp:
    (WebCore::SVGAnimatedLengthAnimator::constructFromString): Ditto.
    * svg/SVGAnimatedLengthList.cpp:
    (WebCore::SVGAnimatedLengthListAnimator::constructFromString): Ditto.
    * svg/SVGAnimatedNumber.cpp:
    (WebCore::SVGAnimatedNumberAnimator::constructFromString): Ditto.
    * svg/SVGAnimatedNumberList.cpp:
    (WebCore::SVGAnimatedNumberListAnimator::constructFromString): Ditto.
    * svg/SVGAnimatedNumberOptionalNumber.cpp:
    (WebCore::SVGAnimatedNumberOptionalNumberAnimator::constructFromString):
    Ditto.
    * svg/SVGAnimatedPointList.cpp:
    (WebCore::SVGAnimatedPointListAnimator::constructFromString): Ditto.
    * svg/SVGAnimatedPreserveAspectRatio.cpp:
    (WebCore::SVGAnimatedPreserveAspectRatioAnimator::constructFromString):
    Ditto.
    * svg/SVGAnimatedRect.cpp:
    (WebCore::SVGAnimatedRectAnimator::constructFromString): Ditto.
    * svg/SVGAnimatedString.cpp:
    (WebCore::SVGAnimatedStringAnimator::constructFromString): Ditto.
    * svg/SVGAnimatedTransformList.cpp:
    (WebCore::SVGAnimatedTransformListAnimator::constructFromString):
    Ditto.
    * svg/SVGAnimatedType.cpp:
    (WebCore::SVGAnimatedType::createAngleAndEnumeration): Use
    std::unique_ptr instead of bare pointer as parameter.
    (WebCore::SVGAnimatedType::createBoolean): Ditto.
    (WebCore::SVGAnimatedType::createColor): Ditto.
    (WebCore::SVGAnimatedType::createEnumeration): Ditto.
    (WebCore::SVGAnimatedType::createInteger): Ditto.
    (WebCore::SVGAnimatedType::createIntegerOptionalInteger): Ditto.
    (WebCore::SVGAnimatedType::createLength): Ditto.
    (WebCore::SVGAnimatedType::createLengthList): Ditto.
    (WebCore::SVGAnimatedType::createNumber): Ditto.
    (WebCore::SVGAnimatedType::createNumberList): Ditto.
    (WebCore::SVGAnimatedType::createNumberOptionalNumber): Ditto.
    (WebCore::SVGAnimatedType::createPointList): Ditto.
    (WebCore::SVGAnimatedType::createPreserveAspectRatio): Ditto.
    (WebCore::SVGAnimatedType::createRect): Ditto.
    (WebCore::SVGAnimatedType::createString): Ditto.
    (WebCore::SVGAnimatedType::createTransformList): Ditto.
    * svg/SVGAnimatedType.h: Use std::unique_ptr as parameter in the
    create methods.
    * svg/SVGAnimatedTypeAnimator.h:
    (WebCore::SVGAnimatedTypeAnimator::constructFromBaseValue): Make
    helper return std::unique_ptr instead of bare pointer.
    (WebCore::SVGAnimatedTypeAnimator::constructFromBaseValues): Ditto.
    
    git-svn-id: http://svn.webkit.org/repository/webkit/trunk@159516 268f45cc-cd09-0410-ab3c-d52691b4dbfc
    694a15ae