Use "= default" to denote default constructor or destructor
[WebKit-https.git] / Source / WebCore / Modules / webaudio / OfflineAudioCompletionEvent.cpp
index 7db5d78..eaf635d 100644 (file)
 
 namespace WebCore {
 
-PassRefPtr<OfflineAudioCompletionEvent> OfflineAudioCompletionEvent::create()
+Ref<OfflineAudioCompletionEvent> OfflineAudioCompletionEvent::create(RefPtr<AudioBuffer>&& renderedBuffer)
 {
-    return adoptRef(new OfflineAudioCompletionEvent);
+    return adoptRef(*new OfflineAudioCompletionEvent(WTFMove(renderedBuffer)));
 }
 
-PassRefPtr<OfflineAudioCompletionEvent> OfflineAudioCompletionEvent::create(PassRefPtr<AudioBuffer> renderedBuffer)
-{
-    return adoptRef(new OfflineAudioCompletionEvent(renderedBuffer));
-}
-
-OfflineAudioCompletionEvent::OfflineAudioCompletionEvent()
-{
-}
-
-
-OfflineAudioCompletionEvent::OfflineAudioCompletionEvent(PassRefPtr<AudioBuffer> renderedBuffer)
+OfflineAudioCompletionEvent::OfflineAudioCompletionEvent(RefPtr<AudioBuffer>&& renderedBuffer)
     : Event(eventNames().completeEvent, true, false)
-    , m_renderedBuffer(renderedBuffer)
+    , m_renderedBuffer(WTFMove(renderedBuffer))
 {
 }
 
-OfflineAudioCompletionEvent::~OfflineAudioCompletionEvent()
-{
-}
+OfflineAudioCompletionEvent::~OfflineAudioCompletionEvent() = default;
 
 EventInterface OfflineAudioCompletionEvent::eventInterface() const
 {