mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
fixing hpux bustage. unnamed unions can't access structs which are protected.
making FragmentBits a public struct, but the variable of this type is still private. The other solution would be to "name" the union and delcare FragmentBits a friend of the union (the union has to be named to declare friendship).
This commit is contained in:
parent
f4d80d28e6
commit
62d848316b
@ -218,6 +218,12 @@ public:
|
||||
return mState.mIs2b ? m2b[aIndex] : PRUnichar(m1b[aIndex]);
|
||||
}
|
||||
|
||||
struct FragmentBits {
|
||||
PRBool mInHeap : 1;
|
||||
PRBool mIs2b : 1;
|
||||
PRUint32 mLength : 30;
|
||||
};
|
||||
|
||||
protected:
|
||||
void ReleaseText();
|
||||
|
||||
@ -228,11 +234,7 @@ protected:
|
||||
|
||||
union {
|
||||
PRUint32 mAllBits;
|
||||
struct {
|
||||
PRBool mInHeap : 1;
|
||||
PRBool mIs2b : 1;
|
||||
PRUint32 mLength : 30;
|
||||
} mState;
|
||||
FragmentBits mState;
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -218,6 +218,12 @@ public:
|
||||
return mState.mIs2b ? m2b[aIndex] : PRUnichar(m1b[aIndex]);
|
||||
}
|
||||
|
||||
struct FragmentBits {
|
||||
PRBool mInHeap : 1;
|
||||
PRBool mIs2b : 1;
|
||||
PRUint32 mLength : 30;
|
||||
};
|
||||
|
||||
protected:
|
||||
void ReleaseText();
|
||||
|
||||
@ -228,11 +234,7 @@ protected:
|
||||
|
||||
union {
|
||||
PRUint32 mAllBits;
|
||||
struct {
|
||||
PRBool mInHeap : 1;
|
||||
PRBool mIs2b : 1;
|
||||
PRUint32 mLength : 30;
|
||||
} mState;
|
||||
FragmentBits mState;
|
||||
};
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user