mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 903543 - eliminate static constructors for SMIL type singletons; r=dholbert
Add MOZ_CONSTEXPR to the constructors to inform the compiler the constructors can be folded away. Remove protected/private destructors so that static destructors don't have to be registered with static constructors.
This commit is contained in:
parent
400a5f7467
commit
f2686f1332
@ -40,10 +40,8 @@ protected:
|
||||
nsSMILValue& aResult) const MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SMILBoolType() {}
|
||||
~SMILBoolType() {}
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SMILBoolType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -41,10 +41,8 @@ protected:
|
||||
nsSMILValue& aResult) const MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SMILEnumType() {}
|
||||
~SMILEnumType() {}
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SMILEnumType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -37,7 +37,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
SMILIntegerType() {}
|
||||
MOZ_CONSTEXPR SMILIntegerType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -41,10 +41,8 @@ protected:
|
||||
nsSMILValue& aResult) const MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SMILStringType() {}
|
||||
~SMILStringType() {}
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SMILStringType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -6,6 +6,7 @@
|
||||
#ifndef NS_ISMILTYPE_H_
|
||||
#define NS_ISMILTYPE_H_
|
||||
|
||||
#include "mozilla/Attributes.h"
|
||||
#include "nscore.h"
|
||||
|
||||
class nsSMILValue;
|
||||
@ -207,13 +208,6 @@ protected:
|
||||
const nsSMILValue& aEndVal,
|
||||
double aUnitDistance,
|
||||
nsSMILValue& aResult) const = 0;
|
||||
|
||||
/**
|
||||
* Protected destructor, to ensure that no one accidentally deletes an
|
||||
* instance of this class.
|
||||
* (The only instances in existence should be singletons - one per subclass.)
|
||||
*/
|
||||
~nsISMILType() {}
|
||||
};
|
||||
|
||||
#endif // NS_ISMILTYPE_H_
|
||||
|
@ -98,10 +98,8 @@ public:
|
||||
static bool ValueToString(const nsSMILValue& aValue, nsAString& aString);
|
||||
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
nsSMILCSSValueType() {}
|
||||
~nsSMILCSSValueType() {}
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR nsSMILCSSValueType() {}
|
||||
};
|
||||
|
||||
#endif // NS_SMILCSSVALUETYPE_H_
|
||||
|
@ -39,10 +39,8 @@ protected:
|
||||
nsSMILValue& aResult) const MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
nsSMILFloatType() {}
|
||||
~nsSMILFloatType() {}
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR nsSMILFloatType() {}
|
||||
};
|
||||
|
||||
#endif // NS_SMILFLOATTYPE_H_
|
||||
|
@ -42,10 +42,8 @@ protected:
|
||||
nsSMILValue& aResult) const MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
nsSMILNullType() {}
|
||||
~nsSMILNullType() {}
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR nsSMILNullType() {}
|
||||
};
|
||||
|
||||
#endif // NS_SMILNULLTYPE_H_
|
||||
|
@ -43,10 +43,8 @@ protected:
|
||||
nsSMILValue& aResult) const MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SVGIntegerPairSMILType() {}
|
||||
~SVGIntegerPairSMILType() {}
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SVGIntegerPairSMILType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -91,10 +91,8 @@ protected:
|
||||
nsSMILValue& aResult) const MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SVGLengthListSMILType() {}
|
||||
~SVGLengthListSMILType() {}
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SVGLengthListSMILType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -71,10 +71,8 @@ public:
|
||||
float aRotateAngle);
|
||||
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SVGMotionSMILType() {}
|
||||
~SVGMotionSMILType() {}
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SVGMotionSMILType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -45,10 +45,8 @@ protected:
|
||||
nsSMILValue& aResult) const MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SVGNumberListSMILType() {}
|
||||
~SVGNumberListSMILType() {}
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SVGNumberListSMILType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -38,10 +38,8 @@ protected:
|
||||
nsSMILValue& aResult) const MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SVGNumberPairSMILType() {}
|
||||
~SVGNumberPairSMILType() {}
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SVGNumberPairSMILType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -58,10 +58,8 @@ protected:
|
||||
nsSMILValue& aResult) const MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SVGOrientSMILType() {}
|
||||
~SVGOrientSMILType() {}
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SVGOrientSMILType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -49,10 +49,8 @@ protected:
|
||||
nsSMILValue& aResult) const MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SVGPathSegListSMILType() {}
|
||||
~SVGPathSegListSMILType() {}
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SVGPathSegListSMILType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -45,10 +45,8 @@ protected:
|
||||
nsSMILValue& aResult) const MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SVGPointListSMILType() {}
|
||||
~SVGPointListSMILType() {}
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SVGPointListSMILType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
@ -121,10 +121,8 @@ public:
|
||||
|
||||
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SVGTransformListSMILType() {}
|
||||
~SVGTransformListSMILType() {}
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SVGTransformListSMILType() {}
|
||||
};
|
||||
|
||||
} // end namespace mozilla
|
||||
|
@ -38,10 +38,8 @@ protected:
|
||||
nsSMILValue& aResult) const MOZ_OVERRIDE;
|
||||
|
||||
private:
|
||||
// Private constructor & destructor: prevent instances beyond my singleton,
|
||||
// and prevent others from deleting my singleton.
|
||||
SVGViewBoxSMILType() {}
|
||||
~SVGViewBoxSMILType() {}
|
||||
// Private constructor: prevent instances beyond my singleton.
|
||||
MOZ_CONSTEXPR SVGViewBoxSMILType() {}
|
||||
};
|
||||
|
||||
} // namespace mozilla
|
||||
|
Loading…
Reference in New Issue
Block a user