Bug 120223

Summary: Cut down repeated code in RefPtr and RetainPtr by using copy/move-and-swap for assignment operators
Product: WebKit Reporter: Darin Adler <darin>
Component: Web Template FrameworkAssignee: Darin Adler <darin>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cmarcelo, commit-queue, mikhail.pozdnyakov
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch andersca: review+

Darin Adler
Reported 2013-08-23 12:52:03 PDT
Cut down repeated code in RefPtr and RetainPtr by using copy/move-and-swap for assignment operators
Attachments
Patch (5.68 KB, patch)
2013-08-23 12:54 PDT, Darin Adler
no flags
Patch (7.08 KB, patch)
2013-08-23 13:03 PDT, Darin Adler
andersca: review+
Darin Adler
Comment 1 2013-08-23 12:54:01 PDT
Darin Adler
Comment 2 2013-08-23 13:03:10 PDT
Darin Adler
Comment 3 2013-08-23 13:42:04 PDT
Mikhail Pozdnyakov
Comment 4 2013-09-12 01:11:48 PDT
What do you think about: template<typename T> inline RefPtr<T>& RefPtr<T>::operator=(RefPtr o) { swap(o); return *this; } This looks even shorter :)
Note You need to log in before you can comment on or make changes to this bug.