mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1048013 - Fix some bad implicit constructors in MFBT; r=froydnj
This commit is contained in:
parent
7207465c1b
commit
3508dd19c8
@ -183,7 +183,7 @@ public:
|
||||
return *this = aOther->SelfReferencingWeakPtr();
|
||||
}
|
||||
|
||||
WeakPtr(T* aOther)
|
||||
MOZ_IMPLICIT WeakPtr(T* aOther)
|
||||
{
|
||||
*this = aOther;
|
||||
}
|
||||
|
@ -29,21 +29,21 @@ using mozilla::Pair;
|
||||
INSTANTIATE(int, int, prim1, 2 * sizeof(int));
|
||||
INSTANTIATE(int, long, prim2, 2 * sizeof(long));
|
||||
|
||||
struct EmptyClass { EmptyClass(int) {} };
|
||||
struct NonEmpty { char mC; NonEmpty(int) {} };
|
||||
struct EmptyClass { explicit EmptyClass(int) {} };
|
||||
struct NonEmpty { char mC; explicit NonEmpty(int) {} };
|
||||
|
||||
INSTANTIATE(int, EmptyClass, both1, sizeof(int));
|
||||
INSTANTIATE(int, NonEmpty, both2, 2 * sizeof(int));
|
||||
INSTANTIATE(EmptyClass, NonEmpty, both3, 1);
|
||||
|
||||
struct A { char dummy; A(int) {} };
|
||||
struct B : A { B(int aI) : A(aI) {} };
|
||||
struct A { char dummy; explicit A(int) {} };
|
||||
struct B : A { explicit B(int aI) : A(aI) {} };
|
||||
|
||||
INSTANTIATE(A, A, class1, 2);
|
||||
INSTANTIATE(A, B, class2, 2);
|
||||
INSTANTIATE(A, EmptyClass, class3, 1);
|
||||
|
||||
struct OtherEmpty : EmptyClass { OtherEmpty(int aI) : EmptyClass(aI) {} };
|
||||
struct OtherEmpty : EmptyClass { explicit OtherEmpty(int aI) : EmptyClass(aI) {} };
|
||||
|
||||
// C++11 requires distinct objects of the same type, within the same "most
|
||||
// derived object", to have different addresses. Pair allocates its elements as
|
||||
|
@ -89,7 +89,7 @@ static int gValues[] = {
|
||||
|
||||
struct SplayInt : SplayTreeNode<SplayInt>
|
||||
{
|
||||
SplayInt(int aValue) : mValue(aValue) {}
|
||||
explicit SplayInt(int aValue) : mValue(aValue) {}
|
||||
|
||||
static int compare(const SplayInt& aOne, const SplayInt& aTwo)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user