зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1544216 Part 5 - add noexcept to move constructors and reassignment operators r=birtles
--HG-- extra : source : 9d57a72036d3ce614762bdb48bdcd1311bc72f12 extra : histedit_source : d33dd73e34c8e88f0949d2d43c56e050eecfc3cf
This commit is contained in:
Родитель
7b7c739afe
Коммит
62fa9f2790
|
@ -33,7 +33,7 @@ class SMILCompositor : public PLDHashEntryHdr {
|
|||
|
||||
explicit SMILCompositor(KeyTypePointer aKey)
|
||||
: mKey(*aKey), mForceCompositing(false) {}
|
||||
SMILCompositor(SMILCompositor&& toMove)
|
||||
SMILCompositor(SMILCompositor&& toMove) noexcept
|
||||
: PLDHashEntryHdr(std::move(toMove)),
|
||||
mKey(std::move(toMove.mKey)),
|
||||
mAnimationFunctions(std::move(toMove.mAnimationFunctions)),
|
||||
|
|
|
@ -42,7 +42,7 @@ const SMILValue& SMILValue::operator=(const SMILValue& aVal) {
|
|||
}
|
||||
|
||||
// Move constructor / reassignment operator:
|
||||
SMILValue::SMILValue(SMILValue&& aVal)
|
||||
SMILValue::SMILValue(SMILValue&& aVal) noexcept
|
||||
: mU(aVal.mU), // Copying union is only OK because we clear aVal.mType
|
||||
// below.
|
||||
mType(aVal.mType) {
|
||||
|
@ -51,7 +51,7 @@ SMILValue::SMILValue(SMILValue&& aVal)
|
|||
aVal.mType = SMILNullType::Singleton();
|
||||
}
|
||||
|
||||
SMILValue& SMILValue::operator=(SMILValue&& aVal) {
|
||||
SMILValue& SMILValue::operator=(SMILValue&& aVal) noexcept {
|
||||
if (!IsNull()) {
|
||||
// Clean up any data we're currently tracking.
|
||||
DestroyAndCheckPostcondition();
|
||||
|
|
|
@ -32,8 +32,8 @@ class SMILValue {
|
|||
const SMILValue& operator=(const SMILValue& aVal);
|
||||
|
||||
// Move constructor / reassignment operator:
|
||||
SMILValue(SMILValue&& aVal);
|
||||
SMILValue& operator=(SMILValue&& aVal);
|
||||
SMILValue(SMILValue&& aVal) noexcept;
|
||||
SMILValue& operator=(SMILValue&& aVal) noexcept;
|
||||
|
||||
// Equality operators. These are allowed to be conservative (return false
|
||||
// more than you'd expect) - see comment above SMILType::IsEqual.
|
||||
|
|
Загрузка…
Ссылка в новой задаче