[Webkit-unassigned] [Bug 73683] KeyframeValueList::operator= is neither safe to use nor prohibited

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Dec 5 11:26:38 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=73683





--- Comment #9 from Darin Adler <darin at apple.com>  2011-12-05 11:26:37 PST ---
(From update of attachment 117892)
View in context: https://bugs.webkit.org/attachment.cgi?id=117892&action=review

> Source/WebCore/platform/graphics/GraphicsLayer.h:182
> +    KeyframeValueList& operator=(const KeyframeValueList& o)
> +    {
> +        if (this == &o)
> +            return *this;
> +
> +        this->~KeyframeValueList();
> +        new (this) KeyframeValueList(o);
> +        return *this;
> +    }

The copy and swap idiom is usually preferred over this idiom. I’d like to use that instead.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list