Bug 1433008 - Make WidgetEvent movable. r=masayuki

The copy-assignment in this patch is used in the copy-constructor.
Note that we can't simply use '= default' implementation since we need to use
MOZ_COUNT_CTOR() in the move constructor.

MozReview-Commit-ID: 8HTMaTONBuN

--HG--
extra : rebase_source : 7da0586e0772a2d71455492412d40780c59558e5
This commit is contained in:
Hiroyuki Ikezoe 2018-01-30 09:26:48 +09:00
Родитель 14c14a8057
Коммит 2e4cb19d33
1 изменённых файлов: 21 добавлений и 0 удалений

Просмотреть файл

@ -550,6 +550,27 @@ public:
MOZ_COUNT_CTOR(WidgetEvent);
*this = aOther;
}
WidgetEvent& operator=(const WidgetEvent& aOther) = default;
WidgetEvent(WidgetEvent&& aOther)
: WidgetEventTime(Move(aOther))
, mClass(aOther.mClass)
, mMessage(aOther.mMessage)
, mRefPoint(Move(aOther.mRefPoint))
, mLastRefPoint(Move(aOther.mLastRefPoint))
, mFocusSequenceNumber(aOther.mFocusSequenceNumber)
, mFlags(Move(aOther.mFlags))
, mSpecifiedEventType(Move(aOther.mSpecifiedEventType))
, mSpecifiedEventTypeString(Move(aOther.mSpecifiedEventTypeString))
, mTarget(Move(aOther.mTarget))
, mCurrentTarget(Move(aOther.mCurrentTarget))
, mOriginalTarget(Move(aOther.mOriginalTarget))
, mRelatedTarget(Move(aOther.mRelatedTarget))
, mPath(Move(aOther.mPath))
{
MOZ_COUNT_CTOR(WidgetEvent);
}
WidgetEvent& operator=(WidgetEvent&& aOther) = default;
virtual WidgetEvent* Duplicate() const
{