Bug 113733: nsXPIDLCString doesn't have an assignment operator.

adds |operator=( const self_type& )| to nsSharable{C}String and nsXPIDL{C}String, to prevent the compiler from synthesizing its own (which won't do the right thing).

This should fix a bunch of XPIDLString-related cfront compile warnings.

original patch by jag, updated by me; r=dbaron, sr=jag.
This commit is contained in:
dwitte%stanford.edu 2003-07-12 07:14:37 +00:00
Родитель c9311f5c07
Коммит d78b684d26
4 изменённых файлов: 64 добавлений и 0 удалений

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

@ -72,6 +72,13 @@ class NS_COM nsSharableString
return *this;
}
// copy-assignment operator. I must define my own if I don't want the compiler to make me one
self_type& operator=( const self_type& aReadable )
{
Assign(aReadable);
return *this;
}
/**
* The |Adopt| method assigns a raw, null-terminated, character
* buffer to this string object by transferring ownership of that
@ -134,6 +141,13 @@ class NS_COM nsSharableCString
return *this;
}
// copy-assignment operator. I must define my own if I don't want the compiler to make me one
self_type& operator=( const self_type& aReadable )
{
Assign(aReadable);
return *this;
}
/**
* The |Adopt| method assigns a raw, null-terminated, character
* buffer to this string object by transferring ownership of that

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

@ -170,6 +170,7 @@ class NS_COM nsXPIDLString
}
#endif
// |operator=| does not inherit, so we must provide it again
self_type&
operator=( const abstract_string_type& aReadable )
{
@ -177,6 +178,14 @@ class NS_COM nsXPIDLString
return *this;
}
// copy-assignment operator. I must define my own if I don't want the compiler to make me one
self_type&
operator=( const self_type& aReadable )
{
Assign(aReadable);
return *this;
}
/**
* This is an override of a non-virtual function on
* |nsSharableString|. This override is not necessary, but it can
@ -282,6 +291,7 @@ class NS_COM nsXPIDLCString
}
#endif
// |operator=| does not inherit, so we must provide it again
self_type&
operator=( const abstract_string_type& aReadable )
{
@ -289,6 +299,14 @@ class NS_COM nsXPIDLCString
return *this;
}
// copy-assignment operator. I must define my own if I don't want the compiler to make me one
self_type&
operator=( const self_type& aReadable )
{
Assign(aReadable);
return *this;
}
/**
* This is an override of a non-virtual function on
* |nsSharableCString|. This override is not necessary, but it can

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

@ -72,6 +72,13 @@ class NS_COM nsSharableString
return *this;
}
// copy-assignment operator. I must define my own if I don't want the compiler to make me one
self_type& operator=( const self_type& aReadable )
{
Assign(aReadable);
return *this;
}
/**
* The |Adopt| method assigns a raw, null-terminated, character
* buffer to this string object by transferring ownership of that
@ -134,6 +141,13 @@ class NS_COM nsSharableCString
return *this;
}
// copy-assignment operator. I must define my own if I don't want the compiler to make me one
self_type& operator=( const self_type& aReadable )
{
Assign(aReadable);
return *this;
}
/**
* The |Adopt| method assigns a raw, null-terminated, character
* buffer to this string object by transferring ownership of that

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

@ -170,6 +170,7 @@ class NS_COM nsXPIDLString
}
#endif
// |operator=| does not inherit, so we must provide it again
self_type&
operator=( const abstract_string_type& aReadable )
{
@ -177,6 +178,14 @@ class NS_COM nsXPIDLString
return *this;
}
// copy-assignment operator. I must define my own if I don't want the compiler to make me one
self_type&
operator=( const self_type& aReadable )
{
Assign(aReadable);
return *this;
}
/**
* This is an override of a non-virtual function on
* |nsSharableString|. This override is not necessary, but it can
@ -282,6 +291,7 @@ class NS_COM nsXPIDLCString
}
#endif
// |operator=| does not inherit, so we must provide it again
self_type&
operator=( const abstract_string_type& aReadable )
{
@ -289,6 +299,14 @@ class NS_COM nsXPIDLCString
return *this;
}
// copy-assignment operator. I must define my own if I don't want the compiler to make me one
self_type&
operator=( const self_type& aReadable )
{
Assign(aReadable);
return *this;
}
/**
* This is an override of a non-virtual function on
* |nsSharableCString|. This override is not necessary, but it can