зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
14c14a8057
Коммит
2e4cb19d33
|
@ -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
|
||||
{
|
||||
|
|
Загрузка…
Ссылка в новой задаче