initialize some variables in constructor declaration rather than the constructor itself

This commit is contained in:
alecf%netscape.com 1999-05-04 20:52:05 +00:00
Родитель cdac942783
Коммит eb6233d510
4 изменённых файлов: 20 добавлений и 16 удалений

Просмотреть файл

@ -64,11 +64,12 @@ union UStrPtr {
**************************************************************************/
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;
mMultibyte=aCharSize;
mCapacity=(aBufferSize>>mMultibyte)-1;
mOwnsBuffer=aOwnsBuffer;
}
PRUint32 mCapacity;

Просмотреть файл

@ -64,11 +64,12 @@ union UStrPtr {
**************************************************************************/
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;
mMultibyte=aCharSize;
mCapacity=(aBufferSize>>mMultibyte)-1;
mOwnsBuffer=aOwnsBuffer;
}
PRUint32 mCapacity;

Просмотреть файл

@ -64,11 +64,12 @@ union UStrPtr {
**************************************************************************/
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;
mMultibyte=aCharSize;
mCapacity=(aBufferSize>>mMultibyte)-1;
mOwnsBuffer=aOwnsBuffer;
}
PRUint32 mCapacity;

Просмотреть файл

@ -64,11 +64,12 @@ union UStrPtr {
**************************************************************************/
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;
mMultibyte=aCharSize;
mCapacity=(aBufferSize>>mMultibyte)-1;
mOwnsBuffer=aOwnsBuffer;
}
PRUint32 mCapacity;