[webkit-reviews] review granted: [Bug 113224] ASSERT_NOT_REACHED() touched in WebCore::SVGAnimatedStringAnimator::addAnimatedTypes : [Attachment 208387] Patch
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Thu Aug 8 19:14:35 PDT 2013
Darin Adler <darin at apple.com> has granted Rob Buis <rwlbuis at gmail.com>'s
request for review:
Bug 113224: ASSERT_NOT_REACHED() touched in
WebCore::SVGAnimatedStringAnimator::addAnimatedTypes
https://bugs.webkit.org/show_bug.cgi?id=113224
Attachment 208387: Patch
https://bugs.webkit.org/attachment.cgi?id=208387&action=review
------- Additional Comments from Darin Adler <darin at apple.com>
View in context: https://bugs.webkit.org/attachment.cgi?id=208387&action=review
> Source/WebCore/svg/SVGAnimateElement.cpp:391
> + // Spec:
http://www.w3.org/TR/SVG/animate.html#AnimationAttributesAndProperties.
> + switch (m_animatedPropertyType) {
> + case AnimatedBoolean:
> + case AnimatedEnumeration:
> + case AnimatedPreserveAspectRatio:
> + case AnimatedString:
> + case AnimatedUnknown:
> + return false;
> + default:
> + return true;
> + }
It’s nice to not have a default case in such switches, since gcc-family
compilers will warn if you forget a type, but include a default turns off that
warning. I like the style where have cases for all the enum values, and then an
ASSERT_NOT_REACHED outside the switch.
More information about the webkit-reviews
mailing list