зеркало из https://github.com/mozilla/pjs.git
initialize some variables in constructor declaration rather than the constructor itself
This commit is contained in:
Родитель
cdac942783
Коммит
eb6233d510
|
@ -64,11 +64,12 @@ union UStrPtr {
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
struct nsBufDescriptor {
|
struct nsBufDescriptor {
|
||||||
nsBufDescriptor(char* aBuffer,PRUint32 aBufferSize,eCharSize aCharSize,PRBool aOwnsBuffer) {
|
nsBufDescriptor(char* aBuffer,PRUint32 aBufferSize,eCharSize aCharSize,PRBool aOwnsBuffer) :
|
||||||
|
mCapacity((aBufferSize>>aCharSize)-1),
|
||||||
|
mOwnsBuffer(aOwnsBuffer),
|
||||||
|
mMultibyte(aCharSize)
|
||||||
|
{
|
||||||
mStr=aBuffer;
|
mStr=aBuffer;
|
||||||
mMultibyte=aCharSize;
|
|
||||||
mCapacity=(aBufferSize>>mMultibyte)-1;
|
|
||||||
mOwnsBuffer=aOwnsBuffer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PRUint32 mCapacity;
|
PRUint32 mCapacity;
|
||||||
|
|
|
@ -64,11 +64,12 @@ union UStrPtr {
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
struct nsBufDescriptor {
|
struct nsBufDescriptor {
|
||||||
nsBufDescriptor(char* aBuffer,PRUint32 aBufferSize,eCharSize aCharSize,PRBool aOwnsBuffer) {
|
nsBufDescriptor(char* aBuffer,PRUint32 aBufferSize,eCharSize aCharSize,PRBool aOwnsBuffer) :
|
||||||
|
mCapacity((aBufferSize>>aCharSize)-1),
|
||||||
|
mOwnsBuffer(aOwnsBuffer),
|
||||||
|
mMultibyte(aCharSize)
|
||||||
|
{
|
||||||
mStr=aBuffer;
|
mStr=aBuffer;
|
||||||
mMultibyte=aCharSize;
|
|
||||||
mCapacity=(aBufferSize>>mMultibyte)-1;
|
|
||||||
mOwnsBuffer=aOwnsBuffer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PRUint32 mCapacity;
|
PRUint32 mCapacity;
|
||||||
|
|
|
@ -64,11 +64,12 @@ union UStrPtr {
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
struct nsBufDescriptor {
|
struct nsBufDescriptor {
|
||||||
nsBufDescriptor(char* aBuffer,PRUint32 aBufferSize,eCharSize aCharSize,PRBool aOwnsBuffer) {
|
nsBufDescriptor(char* aBuffer,PRUint32 aBufferSize,eCharSize aCharSize,PRBool aOwnsBuffer) :
|
||||||
|
mCapacity((aBufferSize>>aCharSize)-1),
|
||||||
|
mOwnsBuffer(aOwnsBuffer),
|
||||||
|
mMultibyte(aCharSize)
|
||||||
|
{
|
||||||
mStr=aBuffer;
|
mStr=aBuffer;
|
||||||
mMultibyte=aCharSize;
|
|
||||||
mCapacity=(aBufferSize>>mMultibyte)-1;
|
|
||||||
mOwnsBuffer=aOwnsBuffer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PRUint32 mCapacity;
|
PRUint32 mCapacity;
|
||||||
|
|
|
@ -64,11 +64,12 @@ union UStrPtr {
|
||||||
**************************************************************************/
|
**************************************************************************/
|
||||||
|
|
||||||
struct nsBufDescriptor {
|
struct nsBufDescriptor {
|
||||||
nsBufDescriptor(char* aBuffer,PRUint32 aBufferSize,eCharSize aCharSize,PRBool aOwnsBuffer) {
|
nsBufDescriptor(char* aBuffer,PRUint32 aBufferSize,eCharSize aCharSize,PRBool aOwnsBuffer) :
|
||||||
|
mCapacity((aBufferSize>>aCharSize)-1),
|
||||||
|
mOwnsBuffer(aOwnsBuffer),
|
||||||
|
mMultibyte(aCharSize)
|
||||||
|
{
|
||||||
mStr=aBuffer;
|
mStr=aBuffer;
|
||||||
mMultibyte=aCharSize;
|
|
||||||
mCapacity=(aBufferSize>>mMultibyte)-1;
|
|
||||||
mOwnsBuffer=aOwnsBuffer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
PRUint32 mCapacity;
|
PRUint32 mCapacity;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче