diff --git a/string/public/nsSharableString.h b/string/public/nsSharableString.h index e28e62ff106d..dc45249b9c4c 100644 --- a/string/public/nsSharableString.h +++ b/string/public/nsSharableString.h @@ -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 diff --git a/string/public/nsXPIDLString.h b/string/public/nsXPIDLString.h index ecb7defe15ae..43a3fbaa1176 100644 --- a/string/public/nsXPIDLString.h +++ b/string/public/nsXPIDLString.h @@ -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 diff --git a/xpcom/string/public/nsSharableString.h b/xpcom/string/public/nsSharableString.h index e28e62ff106d..dc45249b9c4c 100644 --- a/xpcom/string/public/nsSharableString.h +++ b/xpcom/string/public/nsSharableString.h @@ -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 diff --git a/xpcom/string/public/nsXPIDLString.h b/xpcom/string/public/nsXPIDLString.h index ecb7defe15ae..43a3fbaa1176 100644 --- a/xpcom/string/public/nsXPIDLString.h +++ b/xpcom/string/public/nsXPIDLString.h @@ -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