[Webkit-unassigned] [Bug 136327] Initialization for some member variable of FontPlatformData

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Aug 27 21:14:01 PDT 2014


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





--- Comment #2 from Daniel Bates <dbates at webkit.org>  2014-08-27 21:14:07 PST ---
(From update of attachment 237278)
View in context: https://bugs.webkit.org/attachment.cgi?id=237278&action=review

> Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp:229
>      *this = other;

I know you didn't write this, but this isn't a good idiom. That is, calling the assignment operator from inside a copy constructor isn't a good idiom because the former only applies to a fully initialized object and the latter initializes a new object. Instead we should extract the common code into a member function that is called from both the copy assignment and copy constructor. Notice that we also call the copy assignment operator from the default copy constructor: <http://trac.webkit.org/browser/trunk/Source/WebCore/platform/graphics/freetype/FontPlatformDataFreeType.cpp?rev=167768#L216>.

-- 
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