RESOLVED FIXED 120223
Cut down repeated code in RefPtr and RetainPtr by using copy/move-and-swap for assignment operators
https://bugs.webkit.org/show_bug.cgi?id=120223
Summary Cut down repeated code in RefPtr and RetainPtr by using copy/move-and-swap fo...
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.